Skip to content

Commit

Permalink
去除springboot
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangwenping committed Apr 13, 2017
1 parent d5d25b2 commit 5c3a088
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 41 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.snowcattle.game</groupId>
<artifactId>game-sharding-db</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.1-SNAPSHOT</version>

<repositories>
<repository>
Expand Down
33 changes: 14 additions & 19 deletions src/test/java/com/snowcattle/game/db/service/test/aop/AOPTest.java
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
package com.snowcattle.game.db.service.test.aop;

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
* Created by jwp on 2017/3/22.
*/
public class AOPTest {

static PersonService personService;
@BeforeClass
public static void setUpBeforeClass() throws Exception {
ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext(new String[]{"bean/*.xml"});
personService = (PersonService) classPathXmlApplicationContext.getBean("personService");
}
@Test
public void saveTest() {
personService.save(new Person());
}

@AfterClass
public static void tearDownAfterClass() throws Exception {
}
// static PersonService personService;
// @BeforeClass
// public static void setUpBeforeClass() throws Exception {
// ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext(new String[]{"bean/*.xml"});
// personService = (PersonService) classPathXmlApplicationContext.getBean("personServiceBean");
// }
// @Test
// public void saveTest() {
// personService.save(new Person());
// }
//
// @AfterClass
// public static void tearDownAfterClass() throws Exception {
// }
}
42 changes: 21 additions & 21 deletions src/test/resources/bean/applicationContext-jetty.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
<bean id="Server" class="org.eclipse.jetty.server.Server" init-method="start" destroy-method="stop">
<property name="connectors">
<list>
<bean id="Connector" class="org.eclipse.jetty.server.nio.SelectChannelConnector">
<property name="port" value="8080" />
</bean>
</list>
</property>

<property name="handler">
<bean id="handlers" class="org.eclipse.jetty.server.handler.HandlerList">
<property name="handlers">
<list>
<bean class="com.snowcattle.game.db.service.test.jetty.MyHandler" />
<bean class="org.eclipse.jetty.server.handler.DefaultHandler" />
</list>
</property>
</bean>
</property>
</bean>

<!--<bean id="Server" class="org.eclipse.jetty.server.Server" init-method="start" destroy-method="stop"> -->
<!--<property name="connectors"> -->
<!--<list> -->
<!--<bean id="Connector" class="org.eclipse.jetty.server.nio.SelectChannelConnector"> -->
<!--<property name="port" value="8080" /> -->
<!--</bean> -->
<!--</list> -->
<!--</property> -->
<!-- -->
<!--<property name="handler"> -->
<!--<bean id="handlers" class="org.eclipse.jetty.server.handler.HandlerList"> -->
<!--<property name="handlers"> -->
<!--<list> -->
<!--<bean class="com.snowcattle.game.db.service.test.jetty.MyHandler" /> -->
<!--<bean class="org.eclipse.jetty.server.handler.DefaultHandler" /> -->
<!--</list> -->
<!--</property> -->
<!--</bean> -->
<!--</property> -->
<!--</bean> -->
</beans>

0 comments on commit 5c3a088

Please sign in to comment.