This repository was archived by the owner on Jan 18, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +33
-3
lines changed
main/java/org/dyndns/phpusr/contactmanager/execute
test/java/org/dyndns/phpusr/contactmanager/service Expand file tree Collapse file tree 3 files changed +33
-3
lines changed Original file line number Diff line number Diff line change
1
+ package org .dyndns .phpusr .contactmanager .execute ;
2
+
3
+ import org .dyndns .phpusr .contactmanager .entity .Student ;
4
+ import org .dyndns .phpusr .contactmanager .service .StudentService ;
5
+ import org .springframework .context .ApplicationContext ;
6
+ import org .springframework .context .support .ClassPathXmlApplicationContext ;
7
+
8
+ import java .io .File ;
9
+
10
+ /**
11
+ * @author Sergey Doronin
12
+ * Date: 16.04.12
13
+ * Time: 17:35
14
+ */
15
+ public class Run {
16
+
17
+ public static void main (String [] args ) {
18
+ File file = new File ("" );
19
+
20
+ ApplicationContext appContext =
21
+ new ClassPathXmlApplicationContext ("src/main/java/webapp/WEB-INF/resources/spring/root-context.xml" );
22
+
23
+ StudentService studentDao = (StudentService )appContext .getBean ("studentDaoDefault" );
24
+ studentDao .addStudent (new Student ("maloi" , "sur" , "Limp Bizkit" ));
25
+
26
+ System .out .println ("Well Done!" );
27
+ }
28
+ }
Original file line number Diff line number Diff line change 21
21
public class StudentServiceTest {
22
22
23
23
@ Autowired
24
- @ Qualifier ("studentServiceDefault " )
24
+ @ Qualifier ("hello " )
25
25
StudentService service ;
26
26
27
27
@ Before
Original file line number Diff line number Diff line change 13
13
14
14
@ Service ("hello" )
15
15
public class StudentServiceTestImpl implements StudentService {
16
+ public static final String PREFIX = ">>" ;
16
17
17
18
public void addStudent (Student student ) {
18
- //To change body of implemented methods use File | Settings | File Templates.
19
+ System . out . println ( PREFIX + "Adding student: " + student );
19
20
}
20
21
21
22
public List <Student > getStudents () {
22
- return null ; //To change body of implemented methods use File | Settings | File Templates.
23
+ System .out .println (PREFIX + "Getting students" );
24
+ return null ;
23
25
}
24
26
25
27
public void removeStudent (Student student ) {
You can’t perform that action at this time.
0 commit comments