Skip to content

Commit ee51149

Browse files
committed
Merge branch 'develop'
2 parents f959b1e + dce4065 commit ee51149

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
* mockito
2424
* itextpdf
2525

26+
> # github:[https://github.com/netbuffer/ssmbootstrap_table](https://github.com/netbuffer/ssmbootstrap_table)
27+
> # git@osc:[http://git.oschina.net/gradle/ssmbootstrap_table](http://git.oschina.net/gradle/ssmbootstrap_table)
28+
2629
## How to run
2730
The project constructed by `maven`, please execute under the `src/main/java` `SQL script` to your `MySQL` database operation, and then modify the database configuration information `jdbc.properties` under the path `src/main/resource` configuration file in the project directory, enter, execute `mvn tomcat7:run` to run
2831

src/main/java/cn/com/ttblog/ssmbootstrap_table/controller/TestController.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
@RequestMapping("/test")
7070
@SessionAttributes("name")
7171
public class TestController {
72+
private static final Logger LOG=LoggerFactory.getLogger(TestController.class);
7273
private Logger loggerAccess = LoggerFactory.getLogger("access");
7374
// private Logger logger = LoggerFactory.getLogger(this.getClass());
7475
private Logger logger = loggerAccess;
@@ -94,6 +95,19 @@ public void setJdbcUrl(String url) {
9495
JDBCURL = url;
9596
}
9697

98+
//@RequestMapping不写value会默认映射类上的访问路径"/test"
99+
@RequestMapping(method=RequestMethod.GET)
100+
public @ResponseBody String getTest() {
101+
LOG.debug("GET to /test");
102+
return "GET to /test";
103+
}
104+
105+
@RequestMapping(method=RequestMethod.POST)
106+
public @ResponseBody String postTest() {
107+
LOG.debug("POST to /test");
108+
return "POST to /test";
109+
}
110+
97111
@RequestMapping(value = {"/getJdbcUrl" })
98112
public @ResponseBody String getJdbcUrl() {
99113
logger.debug("静态属性值:{}",JDBCURL);

src/main/resources/spring/spring-ehcache.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
">
1313
<!-- http://blog.csdn.net/clj198606061111/article/details/41121437 -->
1414
<cache:annotation-driven cache-manager="cacheManager" />
15+
<!-- idea中需要设置p:shared="true",eclipse不需要设置,否则出错,原因不明...-->
1516
<bean id="cacheManagerFactory"
16-
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" p:shared="true">
17+
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
1718
<property name="configLocation" value="classpath:ehcache.xml" />
1819
</bean>
1920

0 commit comments

Comments
 (0)