这是我的错误信息:
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 0 of constructor in cat.gencat.clt.git.backend.controller.PersonController required a bean of type 'cat.gencat.clt.git.backend.repositories.PersonRepository' that could not be found.
Action:
Consider defining a bean of type 'cat.gencat.clt.git.backend.repositories.PersonRepository' in your configuration.
我的控制器:
@RestController
@RequestMapping(value = "/persons")
@RequiredArgsConstructor
class PersonController {
private final PersonRepository persons;
@GetMapping("")
public Flux<Person> all() {
return this.persons.findAll();
}
}
并且:
@Repository
public interface PersonRepository extends ReactiveCrudRepository<Person, String> {
}
另外,我已启用@EnableR2dbcRepositories
。
我不太明白我做错了什么。
有任何想法吗?
编辑
src/main/java
└── cat
└── gencat
└── clt
└── git
└── backend
├── BackendApplication.java
├── configuration
│ ├── GitConfiguration.java
│ ├── GitProperties.java
│ ├── LoginProperties.java
│ └── TokenProperties.java
├── controller
│ ├── GicarController.java
│ └── PersonController.java
├── model
│ └── Person.java
├── repositories
│ └── PersonRepository.java
├── SavePersonRunner.java
└── security
├── JWTProvider.java
└── SecurityConfiguration.java
@EnableR2dbcRepositories(basePackage="cat.gencat.clt.git.backend.repositories")
- Fabien