Himai Minh wrote:First of all, have you tried @Autowired instead of @Inject?
Secondly, do you have @ComponentScan (basePackages = "....") //where basePackage is the name of the base package such as "com.example" ?
Oh, yes, after change to @Autowired, apple1 can be injected
But why @Inject cannot?
My classpath has javaee-web-api-8.0-sources.jar.