8000 update variable names · fishercoder1534/SpringTutorials@b2f9ba8 · GitHub
[go: up one dir, main page]

Skip to content

Commit b2f9ba8

Browse files
update variable names
1 parent 47a0a4e commit b2f9ba8

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/main/java/spring_bean_post_processor/MainAppDemoBeanPostProcessor.java

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package spring_bean_post_processor;
22

3-
/**This MainApp is working fine.*/
3+
/**
4+
* This MainApp is working fine.
5+
*/
6+
47
import org.springframework.context.support.AbstractApplicationContext;
58
import 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!");

0 commit comments

Comments
 (0)
0