File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
src/main/java/spring_bean_post_processor Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 11package spring_bean_post_processor ;
22
3- /**This MainApp is working fine.*/
3+ /**
4+ * This MainApp is working fine.
5+ */
6+
47import org .springframework .context .support .AbstractApplicationContext ;
58import org .springframework .context .support .ClassPathXmlApplicationContext ;
69
@@ -10,13 +13,13 @@ public static void main(String[] args) {
1013 AbstractApplicationContext context = new ClassPathXmlApplicationContext (
1114 "beansForDemoBeanPostProcessor.xml" );
1215
13- common .HelloWorld obj = (common .HelloWorld ) context .getBean ("helloWorld" );
14- obj .getMessage ();
15-
16- common .HelloChina obj2 = (common .HelloChina ) context .getBean ("helloChina" );
17- obj2 .setMessage ("China is saying hello to the rest of the world!" );
18- // obj2 .getMessage();
19-
16+ common .HelloWorld helloWorld = (common .HelloWorld ) context .getBean ("helloWorld" );
17+ helloWorld .getMessage ();
18+
19+ common .HelloChina helloChina = (common .HelloChina ) context .getBean ("helloChina" );
20+ helloChina .setMessage ("China is saying hello to the rest of the world!" );
21+ helloChina .getMessage ();
22+
2023 context .registerShutdownHook ();
2124
2225 System .out .println ("The program ended! Cool!" );
You can’t perform that action at this time.
0 commit comments