I can't run spring boot application while I am getting the next error "Consider defining a bean of type 'exampleService(exampleService is interface)' in your configuration". exampleService - is coming from openApiGeneration. Should I solve the problem direct from build.gradle? The code is written in kotlin
CodePudding user response:
In the build.gradle
file, add the following lines:
compile "org.springframework.boot:spring-boot-starter-data-jpa"
compile "org.springframework.boot:spring-boot-starter-data-rest"
compile "org.springframework.boot:spring-boot-starter-hateoas"
CodePudding user response:
This problem means that there is no Bean (@Service or @Component) that implements the interface you have mentioned. Hence, Spring cannot find a bean to autowire. Consider adding an implementation of the interface with the @service antonation.