Commit 28c68c45 by 雷紫添

去掉jsp依赖

parent 17632900
......@@ -37,21 +37,7 @@
</dependency>
<!-- servlet 依赖 -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
<!-- 数据库驱动包 -->
<dependency>
<groupId>org.oracle</groupId>
......
......@@ -10,9 +10,7 @@ import com.founder.service.FaceService;
import com.founder.service.JccjService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
......@@ -24,26 +22,19 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/jccj")
@RestController
@RequestMapping(value="/jccj",produces = "application/json; charset=utf-8")
public class JccjController {
@Autowired
private JccjService jccjService;
@RequestMapping(value = "/xxbs", method = {RequestMethod.POST, RequestMethod.GET})
public void queryDatas(HttpServletResponse response, HttpServletRequest request, @RequestBody Jccj jccj) {
@ResponseBody
@PostMapping("/xxbs")
public Object queryDatas( HttpServletRequest request, @RequestBody Jccj jccj) {
//1.验证是否非法调用(1.ip受限访问.2.加锁防止重复提交.3.文件名)
Map<String, Object> res = new HashMap<>();
res=jccjService.res(jccj);
response.setCharacterEncoding("utf-8");
try {
response.getWriter().write(JSON.toJSONString(res));
} catch (IOException e) {
e.printStackTrace();
}
return res;
}
......
......@@ -66,7 +66,7 @@ public class RycjServiceImpl implements RycjService {
bool=true;
}
}catch (Exception e){
System.out.print("增加失败");
System.out.print("增加失败"+e.getMessage());
}
return bool;
}
......
......@@ -29,7 +29,7 @@ public class test {
jccj.setXxsb_zip(encodedText);
jccj.setTaskid("JCXX-R1100000500002014070008");
jccj.setUser_id("142728188997588823");
jccj.setUser_dept("140000000000");
jccj.setUser_dept("1400000000");
jccj.setVersion("1.00");
//发送,httpclient 包含zip包
JSONObject jsonResult= JccjServiceImpl.requestByPost("http://localhost/jccj/xxbs",jccj);
......
spring:
profiles:
active: dev
mvc:
view:
prefix: /WEB-INF/
suffix: .jsp
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
......
......@@ -97,7 +97,7 @@
<if test="status_code != null">
#{status_code},
</if>
<if test="version == null">
<if test="status_code == null">
NULL,
</if>
<if test="status_message != null">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment