SpringMVC --- 拦截器 HandlerInterceptor
摘要:1. springmvc.xml 设置拦截器 1 <mvc:interceptors> 2 <mvc:interceptor> 3 <mvc:mapping path="/*"/> 4 <bean class="com.xing.intercep.IntercepterDemo"></bean> 5
阅读全文
posted @
2019-11-18 20:26
iscurry
阅读(144)
推荐(0)
Spring MVC --- 异步请求
摘要:1. web <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"> </script> <script> function fun1() { $.ajax({ type:"post", url:"getJson.a
阅读全文
posted @
2019-11-18 20:21
iscurry
阅读(145)
推荐(0)
Spring MVC--RequestMapping
摘要:1. 窄化请求 在类上用注解 @RequestMapping 相当于在加一层目录 访问时 : 项目名/user/....... 1 //窄化请求 2 @RequestMapping("user") 3 public class UserControoler {} 2. 参数绑定 1 @Respons
阅读全文
posted @
2019-11-15 16:01
iscurry
阅读(152)
推荐(0)
Spring MVC 异常控制
摘要:1. application.xml <bean id="exceptionHandler" class="com.xing.handler.MyExceptionHandler"></bean> 2.package handler Class ... 1 public class MyExcept
阅读全文
posted @
2019-11-15 15:29
iscurry
阅读(133)
推荐(0)
Spring简答题
摘要:1:请解释下Spring框架中的IoC? Spring中的 org.springframework.beans 包和 org.springframework.context包构成了Spring框架IoC容器的基础。BeanFactory 接口提供了一个先进的配置机制,使得任何类型的对象的配置成为可能
阅读全文
posted @
2019-11-15 11:39
iscurry
阅读(617)
推荐(0)
Spring mvc 简单练习
摘要:1. web.xml 1 <!-- 解决post乱码问题 --> 2 <filter> 3 <filter-name>encoding</filter-name> 4 <filter-class>org.springframework.web.filter.CharacterEncodingFilt
阅读全文
posted @
2019-11-15 11:35
iscurry
阅读(229)
推荐(0)
Spring Ioc/DI 的理解
摘要:原文链接:https://www.cnblogs.com/raysource/p/9300063.html 学习spring的童鞋都知道,spring中有两个非常重要的点,Ioc(控制反转)与DI(依赖注入),对于初级玩家来说,这两个概念可能有点模棱两可的感觉,今天就谈下自己的一点理解,不足请多多指
阅读全文
posted @
2019-11-09 16:07
iscurry
阅读(159)
推荐(0)