1. Mybatis简单操作
摘要:0. pom.jar <!-- https://mvnrepository.com/artifact/org.mybatis/mybatis --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId
阅读全文
posted @
2019-11-18 20:35
iscurry
阅读(165)
推荐(0)
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
阅读(146)
推荐(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
阅读(153)
推荐(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
阅读(134)
推荐(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
阅读(230)
推荐(0)
idea-maven--玄学错误
摘要:所有方法均不能输出结果,也不报错 Process finished with exit code -1073741819 金山词霸冲突,额,彻底关闭
阅读全文
posted @
2019-11-15 10:32
iscurry
阅读(123)
推荐(0)
IDEA 配置 MAVEN 及 TOMCAT
摘要:1. 字体设置 2. 代码提示, 可以和eclipse的一样,不过还是有某些不一样的 3. 代码提示不区分大小写,默认string是不会提示的,只有String才会,把这个设置取消勾选,就行了 4. 配置MAVEN,先全局设置 5. 设置本用户的idea的MAVEN 6. 创建 MAVEN-web
阅读全文
posted @
2019-11-12 16:31
iscurry
阅读(1397)
推荐(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)
idea创建类模板和方法模板
摘要:创建类模板 按照顺序打开File–>settings–>Editor–>File and Code Templates–>Includes
阅读全文
posted @
2019-11-04 21:07
iscurry
阅读(1152)
推荐(0)
JSTL--连接数据库操作
摘要:1. 导入jar包 2. 引入资源 3. 连接 <sql:setDataSource> 5. 增删改
阅读全文
posted @
2019-11-01 21:17
iscurry
阅读(733)
推荐(0)
JSTL
摘要:JSTL: Java server pages standarded tag library java服务页标准标签库, 功能 :实现 条件判断,迭代,XML解析,SQL连接与处理。 使用:一般和 EL输出表达式连用,JSTL逻辑,EL输出 1. 在WEB-INF下的lib下导入 javax.ser
阅读全文
posted @
2019-11-01 20:23
iscurry
阅读(143)
推荐(0)
JSP页面乱码
摘要:// 解决乱码问题: request.setCharacterEncoding("utf-8"); response.setCharacterEncoding("utf-8"); response.setContentType("text/html;charset=utf-8");
阅读全文
posted @
2019-11-01 15:56
iscurry
阅读(105)
推荐(0)
java 无法继承 HttpServlet类
摘要:在 WEB-INF 下的 lib 目录下 手动手动导入 servlet-api.jar 并添加到 项目中 就OK 了 servlet-api.jar 是在
阅读全文
posted @
2019-11-01 15:18
iscurry
阅读(1850)
推荐(0)
java.lang.NumberFormatException: For input String " 0"
摘要:花了将近1天时间找这个错误,原因竟然是 " 0" 字符串内多了个空格 ,, 两个月前也出现过类似问题,记录一下 错误: 原因: 2019-11-0111:04:25 yes.i'm dog
阅读全文
posted @
2019-11-01 10:46
iscurry
阅读(4251)
推荐(0)