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 1
1
package spring_bean_post_processor ;
2
2
3
- /**This MainApp is working fine.*/
3
+ /**
4
+ * This MainApp is working fine.
5
+ */
6
+
4
7
import org .springframework .context .support .AbstractApplicationContext ;
5
8
import org .springframework .context .support .ClassPathXmlApplicationContext ;
6
9
@@ -10,13 +13,13 @@ public static void main(String[] args) {
10
13
AbstractApplicationContext context = new ClassPathXmlApplicationContext (
11
14
"beansForDemoBeanPostProcessor.xml" );
12
15
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
+
20
23
context .registerShutdownHook ();
21
24
22
25
System .out .println ("The program ended! Cool!" );
You can’t perform that action at this time.
0 commit comments