Wie kann ich nach dem Festlegen einer neuen Konfiguration alle Federobjekte aktualisieren?

Wie kann ich vorher aktualisieren@Autowired spring Objekte nach dynamischen Konfigurationsänderungen?

// Here is my updateConfig method

GenericApplicationContext context = new GenericApplicationContext();
XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(context);
reader.loadBeanDefinitions(new ClassPathResource("applicationContext.xml"));
context.refresh();

myApplicationContextAware.setApplicationContext(context);

MitmyApplicationContextAware.applicationContext.getBean(MyClass.class) Ich kann durch neue Konfiguration neue Instanzen erhalten, aber alle@Autowired Objekte enthalten noch alte Werte

Gibt es eine Lösung zum Auffrischen von Frühlingsobjekten?

Antworten auf die Frage(2)

Ihre Antwort auf die Frage