I have some problems wth autowire annotation. My app looks like this:
Here is controller:
@Controller
public class MyController {
@Autowired
@Qua
There can be two reasons for this.
When you have not annotated the injected object or say service with proper @Service/@Component/@Repository annotations.
Once you have made sure of point 1 ,next check for whether the class package of your annotated service class is included in the class-path for your spring boot application in the main class.You can configure this using the following annotation.
@SpringBootApplication(scanBasePackages = { "com.ie.efgh.somepackage","com.ie.abcd.someotherpackage" })
Doing this you tell spring to look into the packages for the classes during class loading.