Skip to content

Commit 5f08176

Browse files
author
vvedenin
committed
JAL-211 Fix Spring HelloWorld files
1 parent 6ac6237 commit 5f08176

13 files changed

+33
-27
lines changed

hellowords/1.1-common-frameworks/spring/resources/constructorAutowired.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
66

77

8-
<bean id="Notifier" class="com.github.vedenin.rus.spring_xml.XmlConstructorAutowiredTest$Notifier">
8+
<bean id="Notifier" class="xml.XmlConstructorAutowiredHelloWorld$Notifier">
99
<constructor-arg ref="NotificationService" />
1010
</bean>
1111

12-
<bean id="NotificationService" class="com.github.vedenin.rus.spring_xml.XmlConstructorAutowiredTest$EMailService"></bean>
12+
<bean id="NotificationService" class="xml.XmlConstructorAutowiredHelloWorld$EMailService"></bean>
1313

1414
</beans>

hellowords/1.1-common-frameworks/spring/resources/constructorInject.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
66

77

8-
<bean id="Notifier" class="com.github.vedenin.rus.spring_xml.jsr300.XmlConstructorInjectTest$Notifier">
8+
<bean id="Notifier" class="xml.jsr300.XmlConstructorInjectHelloWorld$Notifier">
99
<constructor-arg ref="NotificationService" />
1010
</bean>
1111

12-
<bean id="NotificationService" class="com.github.vedenin.rus.spring_xml.jsr300.XmlConstructorInjectTest$EMailService"></bean>
12+
<bean id="NotificationService" class="xml.jsr300.XmlConstructorInjectHelloWorld$EMailService"></bean>
1313

1414
</beans>

hellowords/1.1-common-frameworks/spring/resources/fieldAutowired.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
66

77

8-
<bean id="Notifier" class="com.github.vedenin.rus.spring_xml.XmlFieldAutowiredTest$Notifier">
8+
<bean id="Notifier" class="xml.XmlFieldAutowiredHelloWorld$Notifier">
99
<property name="service" ref="NotificationService"/>
1010
</bean>
1111

12-
<bean id="NotificationService" class="com.github.vedenin.rus.spring_xml.XmlFieldAutowiredTest$EMailService"/>
12+
<bean id="NotificationService" class="xml.XmlFieldAutowiredHelloWorld$EMailService"/>
1313

1414
</beans>

hellowords/1.1-common-frameworks/spring/resources/setterAutowired.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
66

77

8-
<bean id="Notifier" class="com.github.vedenin.rus.spring_xml.XmlFieldAutowiredTest$Notifier">
8+
<bean id="Notifier" class="xml.XmlFieldAutowiredHelloWorld$Notifier">
99
<property name="service" ref="NotificationService"/>
1010
</bean>
1111

12-
<bean id="NotificationService" class="com.github.vedenin.rus.spring_xml.XmlFieldAutowiredTest$EMailService"/>
12+
<bean id="NotificationService" class="xml.XmlFieldAutowiredHelloWorld$EMailService"/>
1313

1414
</beans>

hellowords/1.1-common-frameworks/spring/src/SpringConstructorAutowiredTest.java renamed to hellowords/1.1-common-frameworks/spring/src/SpringConstructorAutowiredHelloWorld.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
import org.springframework.context.annotation.Configuration;
55

66
/**
7-
* Constructor DI injection
7+
* Constructor DI injection Hello World using Java annotation
88
*
99
* Created by vvedenin on 11/14/2015.
1010
*/
11-
public class SpringConstructorAutowiredTest {
11+
public class SpringConstructorAutowiredHelloWorld {
1212
public static class Notifier {
1313
private final NotificationService service;
1414

@@ -48,6 +48,6 @@ public NotificationService getNotificationService(){
4848
public static void main(String[] args) throws Exception {
4949
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(DIConfiguration.class);
5050
Notifier notifier = context.getBean(Notifier.class);
51-
notifier.send("test email"); // Print "I send email: test email"
51+
notifier.send("Hello world!"); // Print "I send email: Hello world!"
5252
}
5353
}

hellowords/1.1-common-frameworks/spring/src/SpringFieldAutowiredTest.java renamed to hellowords/1.1-common-frameworks/spring/src/SpringFieldAutowiredHelloWorld.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
import org.springframework.context.annotation.Configuration;
55

66
/**
7-
* Field DI injection
7+
* Field DI injection Hello World using Java annotation
88
*
99
* Created by vvedenin on 11/14/2015.
1010
*/
11-
public class SpringFieldAutowiredTest {
11+
public class SpringFieldAutowiredHelloWorld {
1212
public static class Notifier {
1313
@Autowired
1414
private NotificationService service;
@@ -44,6 +44,6 @@ public NotificationService getNotificationService(){
4444
public static void main(String[] args) throws Exception {
4545
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(DIConfiguration.class);
4646
Notifier notifier = context.getBean(Notifier.class);
47-
notifier.send("test email"); // Print "I send email: test email"
47+
notifier.send("Hello World!"); // Print "I send email: Hello World!"
4848
}
4949
}

hellowords/1.1-common-frameworks/spring/src/SpringSetterAutowiredTest.java renamed to hellowords/1.1-common-frameworks/spring/src/SpringSetterAutowiredHelloWorld.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
import org.springframework.context.annotation.Configuration;
55

66
/**
7-
* Setter DI injection
7+
* Setter DI injection Hello World using Java annotation
88
*
99
* Created by vvedenin on 11/14/2015.
1010
*/
11-
public class SpringSetterAutowiredTest {
11+
public class SpringSetterAutowiredHelloWorld {
1212
public static class Notifier {
1313
private NotificationService service;
1414

@@ -48,6 +48,6 @@ public NotificationService getNotificationService(){
4848
public static void main(String[] args) throws Exception {
4949
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(DIConfiguration.class);
5050
Notifier notifier = context.getBean(Notifier.class);
51-
notifier.send("test email"); // Print "I send email: test email"
51+
notifier.send("Hello World!"); // Print "I send email: Hello World!"
5252
}
5353
}

hellowords/1.1-common-frameworks/spring/src/jsr300/SpringSimpleInjectTest.java renamed to hellowords/1.1-common-frameworks/spring/src/jsr300/SpringSimpleInjectHelloWorld.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
import javax.inject.Inject;
99

1010
/**
11+
* Hello World using jsr300 annotation
1112
*
1213
* Created by vvedenin on 11/14/2015.
1314
*/
14-
public class SpringSimpleInjectTest {
15+
public class SpringSimpleInjectHelloWorld {
1516
public static class Notifier {
1617
private final NotificationService service;
1718

@@ -51,6 +52,6 @@ public NotificationService getNotificationService(){
5152
public static void main(String[] args) throws Exception {
5253
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(DIConfiguration.class);
5354
Notifier notifier = context.getBean(Notifier.class);
54-
notifier.send("test email"); // Print "I send email: test email"
55+
notifier.send("Hello world!"); // Print "I send email: Hello world!"
5556
}
5657
}

hellowords/1.1-common-frameworks/spring/src/xml/XmlConstructorAutowiredTest.java renamed to hellowords/1.1-common-frameworks/spring/src/xml/XmlConstructorAutowiredHelloWorld.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
import org.springframework.context.support.ClassPathXmlApplicationContext;
66

77
/**
8+
* Constructor DI injection Hello World using XML config
89
*
910
* Created by vvedenin on 11/14/2015.
1011
*/
11-
public class XmlConstructorAutowiredTest {
12+
public class XmlConstructorAutowiredHelloWorld {
1213
public static class Notifier {
1314
private final NotificationService service;
1415

@@ -36,6 +37,6 @@ public static void main(String[] args) throws Exception {
3637
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
3738
"constructorAutowired.xml");
3839
Notifier notifier = context.getBean(Notifier.class);
39-
notifier.send("test email"); // Print "I send email: test email"
40+
notifier.send("Hello world!"); // Print "I send email: Hello world!"
4041
}
4142
}

hellowords/1.1-common-frameworks/spring/src/xml/XmlFieldAutowiredTest.java renamed to hellowords/1.1-common-frameworks/spring/src/xml/XmlFieldAutowiredHelloWorld.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
import org.springframework.context.support.ClassPathXmlApplicationContext;
66

77
/**
8+
* Field DI injection Hello World using XML config
89
*
910
* Created by vvedenin on 11/14/2015.
1011
*/
11-
public class XmlFieldAutowiredTest {
12+
public class XmlFieldAutowiredHelloWorld {
1213
public static class Notifier {
1314
@Autowired
1415
private NotificationService service;
@@ -36,6 +37,6 @@ public static void main(String[] args) throws Exception {
3637
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
3738
"fieldAutowired.xml");
3839
Notifier notifier = context.getBean(Notifier.class);
39-
notifier.send("test email"); // Print "I send email: test email"
40+
notifier.send("Hello world!"); // Print "I send email: Hello world!"
4041
}
4142
}

0 commit comments

Comments
 (0)