Skip to content

Commit 4e1d298

Browse files
committed
Merge branch 'develop'
2 parents 7659a01 + 7f5db4a commit 4e1d298

File tree

6 files changed

+59
-213
lines changed

6 files changed

+59
-213
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66
/.settings/
77
/reports
88
/.pmd
9-
/.springBeans
9+
/.springBeans
10+
/.idea/
11+
/ssmbootstrap_table.iml

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

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
import java.io.IOException;
44
import java.util.Arrays;
5+
import java.util.Map;
56
import java.util.concurrent.Callable;
67
import java.util.concurrent.TimeUnit;
7-
88
import javax.annotation.Resource;
99
import javax.servlet.http.HttpServletRequest;
1010
import javax.servlet.http.HttpServletResponse;
1111
import javax.servlet.http.HttpSession;
1212

13+
import org.apache.commons.io.IOUtils;
1314
import org.apache.commons.lang3.builder.ToStringBuilder;
14-
import org.eclipse.jetty.util.log.Log;
1515
import org.slf4j.Logger;
1616
import org.slf4j.LoggerFactory;
1717
import org.springframework.stereotype.Controller;
@@ -251,7 +251,25 @@ public User t(@PathVariable Long id, HttpServletRequest request,
251251
logger.debug("receive json obj:{}",user);
252252
return user;
253253
}
254-
254+
255+
//接收JSONObject
256+
@RequestMapping("/receiveJSONObject")
257+
public @ResponseBody
258+
Map receivejsonobj(@RequestBody JSONObject user,HttpServletRequest request) {
259+
logger.debug("receiveJSONObject:{}",user);
260+
return user;
261+
262+
}
263+
264+
//接收Map
265+
@RequestMapping("/receiveMap")
266+
public @ResponseBody
267+
Map receivejsonobj(@RequestBody Map user,HttpServletRequest request) {
268+
logger.debug("receiveMap:{}",user);
269+
return user;
270+
271+
}
272+
255273
/**
256274
* 获取session中name的值
257275
*
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package cn.com.ttblog.ssmbootstrap_table.servlet;
2+
3+
import org.apache.commons.io.IOUtils;
4+
import org.slf4j.Logger;
5+
import org.slf4j.LoggerFactory;
6+
7+
import javax.servlet.ServletException;
8+
import javax.servlet.annotation.WebServlet;
9+
import javax.servlet.http.HttpServlet;
10+
import javax.servlet.http.HttpServletRequest;
11+
import javax.servlet.http.HttpServletResponse;
12+
import java.io.IOException;
13+
14+
@WebServlet(name = "Servlet",urlPatterns = "/testservlet")
15+
public class TestServlet extends HttpServlet{
16+
17+
private static final Logger LOG= LoggerFactory.getLogger(TestServlet.class);
18+
19+
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
20+
21+
}
22+
23+
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
24+
LOG.debug("doget");
25+
response.getWriter().write("hello");
26+
}
27+
}

src/main/resources/spring/._spring-mvc.xml4116380028147889742.tmp

Lines changed: 0 additions & 199 deletions
This file was deleted.

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

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<beans xmlns="http://www.springframework.org/schema/beans"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
4-
xmlns:context="http://www.springframework.org/schema/context"
5-
xmlns:cache="http://www.springframework.org/schema/cache"
6-
xsi:schemaLocation="http://www.springframework.org/schema/beans
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns:p="http://www.springframework.org/schema/p"
5+
xmlns:cache="http://www.springframework.org/schema/cache"
6+
xsi:schemaLocation="http://www.springframework.org/schema/beans
77
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
8-
http://www.springframework.org/schema/context
9-
http://www.springframework.org/schema/context/spring-context-3.2.xsd
10-
http://www.springframework.org/schema/cache
11-
http://www.springframework.org/schema/cache/spring-cache-3.2.xsd
12-
">
8+
http://www.springframework.org/schema/cache
9+
http://www.springframework.org/schema/cache/spring-cache-3.2.xsd">
1310
<!-- http://blog.csdn.net/clj198606061111/article/details/41121437 -->
1411
<cache:annotation-driven cache-manager="cacheManager" />
1512
<!-- idea中需要设置p:shared="true",eclipse不需要设置,否则出错,原因不明...-->
1613
<bean id="cacheManagerFactory"
17-
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
14+
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" p:shared="true">
1815
<property name="configLocation" value="classpath:ehcache.xml" />
1916
</bean>
2017

src/main/webapp/WEB-INF/web.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
/*/image/**
123123
/*/jsonp/**
124124
/*/cxf/**
125+
/testservlet
125126
</param-value>
126127
</init-param>
127128
</filter>

0 commit comments

Comments
 (0)