java - JSR-250 vs JSR-330 for injecting Application Context -


i'm seeing issue jsr-330 @inject annotation not populating applicationcontext bean. when using jsr-250 @resource annotation gets injected properly. yes, know have myclass implement applicationcontextaware, wondering why @resource works, @inject not. i'm using spring-context version 4.1.6.release , java 8

this works:

@named public class myclass {    @resource   public applicationcontext applicationcontext;  ... } 

this has applicationcontext null

@named public class myclass {    @inject   public applicationcontext applicationcontext;    ... } 


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -