ApplicationContextAware , spring. UserMenuUpdateTask (activeUsers) spring , , applicationContext.
Write the constructor without parameters, set the scope for the prototype and get this object from spring, set activeUsers in the next line, and it should work. Or install the application by hand after creating the object.
I would also recommend that you change these lines
for (User user : userNamesList) {
featureService = (FeatureService) applicationContext.getBean("featureService");
uxService = (UxService) applicationContext.getBean("uxService");
}
to
featureService = (FeatureService) applicationContext.getBean("featureService");
uxService = (UxService) applicationContext.getBean("uxService");
for (User user : userNamesList) {
}
source
share