随笔分类 -  springmvc

ajax异步交互
摘要:jquery中对ajax做了很好的封装。可以使用$.ajax() , $.post() , $.get()方法。 $.ajax({ url: "", data: "", success:function(data){}, error:function(msg){} })post和get方法一样。其中 阅读全文

posted @ 2020-11-19 18:56 Difcipo 阅读(94) 评论(0) 推荐(0)

Json前后端数据交互
摘要:1.idea创建一个maven项目 2.引入项目需要的依赖 <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind --> <dependency> <groupId>com.faster 阅读全文

posted @ 2020-11-19 18:14 Difcipo 阅读(251) 评论(0) 推荐(0)

SpringMVC重定向和转发
摘要:1. forward 转发:地址栏不发生变化。在springmvc中直接转发的jsp页面不能是WEB-INF下面的页面,否者会出现404找不到页面。如果写全路径是可以的但是不好看了。我们可以另外写一个方法: @RequestMapping("/rest") public String test2(M 阅读全文

posted @ 2020-06-08 10:10 Difcipo 阅读(235) 评论(0) 推荐(0)

导航