8000 cosmetic changes · fishercoder1534/SpringTutorials@47a0a4e · GitHub
[go: up one dir, main page]

Skip to content

Commit 47a0a4e

Browse files
cosmetic changes
1 parent 8b08c3a commit 47a0a4e

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

src/main/java/pureXMLDependencyInjecttionExample/MainApp.java

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,25 @@
33
import org.springframework.context.support.AbstractApplicationContext;
44
import org.springframework.context.support.ClassPathXmlApplicationContext;
55

6-
/**This app is running fine!
6+
/**
7+
* This app is running fine!
78
* Remember to add apache.commson.logging and spring jars onto your classpath, otherwise the program won't run.
89
* It helps me understand how @Resource annotation works! Cool!
910
* Look at this project along with other two:
1011
* SpringPureXMLDependencyInjectionExample
1112
* Spring@RessourceAnnotationExample
12-
* to help me better understand the three possible ways to do DI using Spring.*/
13+
* to help me better understand the three possible ways to do DI using Spring.
14+
*/
1315
public class MainApp {
1416

1517
public static void main(String... args) {
1618
System.out.println("It started!");
17-
AbstractApplicationContext context = new ClassPathXmlApplicationContext("spring.xml");
18-
Person p =(Person) context.getBean("person");
19+
AbstractApplicationContext context = new ClassPathXmlApplicationContext("spring.xml");
20+
Person p = (Person) context.getBean("person");
1921

20-
System.out.println(p.getCity().toString());
21-
System.out.println(p.getWife().toString());
22-
System.out.println(p.getCareer().toString());
23-
}
22+
System.out.println(p.getCity().toString());
23+
System.out.println(p.getWife().toString());
24+
System.out.println(p.getCareer().toString());
25+
System.out.println("It finished!");
26+
}
2427
}

src/main/resources/spring.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--suppress SpringFacetInspection -->
23
<beans xmlns="http://www.springframework.org/schema/beans"
34
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
45
xmlns:context="http://www.springframework.org/schema/context"

0 commit comments

Comments
 (0)
0