https://www.javacodegeeks.com/2017/11/spring-framework-application-context-three-ways-get-application-context.html
https://confluence.jaytaala.com/display/TKB/Super+simple+approach+to+accessing+Spring+beans+from+non-Spring+managed+classes+and+POJOs
https://stackoverflow.com/questions/11682858/spring-how-to-get-hold-of-application-context-in-webapp-and-standalone-program
https://stackoverflow.com/questions/21827548/spring-get-current-applicationcontext
https://stackoverflow.com/questions/18347518/spring-autowiring-not-working-from-a-non-spring-managed-class
https://confluence.jaytaala.com/display/TKB/Super+simple+approach+to+accessing+Spring+beans+from+non-Spring+managed+classes+and+POJOs
https://stackoverflow.com/questions/11682858/spring-how-to-get-hold-of-application-context-in-webapp-and-standalone-program
https://stackoverflow.com/questions/21827548/spring-get-current-applicationcontext
https://stackoverflow.com/questions/18347518/spring-autowiring-not-working-from-a-non-spring-managed-class
Make a static variable as appContext in the helper class
Make the helper Class Spring Managed by @Component/@Configuration
Make it autowired on setter method
and make static getter method
No comments:
Post a Comment