2018年1月4日
摘要: 免费申请了一台阿里云ecs服务器,安装了tomcat后外网访问不了测试页面,ping服务器公网没问题,telnet公网8080端口连不了,22端口却可以,后面发现需要添加安全组规则里增加入方向端口,如下: 阅读全文
posted @ 2018-01-04 14:12 chuansao 阅读(4870) 评论(0) 推荐(0) 编辑
  2017年9月7日
摘要: maven依赖里redis的依赖spring-boot-starter-data-redis和spring-boot-starter-redis有什么区别? spring-boot-starter-data-redis有的类和方法没有,不知道是不是版本更新了的原因 阅读全文
posted @ 2017-09-07 16:20 chuansao 阅读(1751) 评论(0) 推荐(0) 编辑
  2017年9月3日
摘要: 如放红框所在的包里启动报错,放外一层正常启动: 阅读全文
posted @ 2017-09-03 23:22 chuansao 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 用<version>1.3.0.M1</version>时test类里注解@SpringApplicationConfiguration正常,用1.5.6.RELEASE报错,怀疑后者版本已经对注解有所修改 1.3.0.M1版本还要依赖: <repositories> <repository> <i 阅读全文
posted @ 2017-09-03 23:19 chuansao 阅读(607) 评论(0) 推荐(0) 编辑
  2017年8月19日
摘要: 导入spring boot工程后有红色小叹号,代码也有错误提示: 排查发现是maven已经修改了本地仓库路径((默认在系统的个人文件夹下的.m2目录下:C:\Users\*\.m2\repository),而sts默认读取的还是.m2目录下的jar: 两个路径不同导致。 一、重新配置一个maven, 阅读全文
posted @ 2017-08-19 13:42 chuansao 阅读(6316) 评论(0) 推荐(0) 编辑
  2017年8月14日
摘要: 测试页面代码: <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script><title>首页</title><script type="text/javascript"> $().ready(function(){ al 阅读全文
posted @ 2017-08-14 13:03 chuansao 阅读(1813) 评论(0) 推荐(0) 编辑
  2014年11月11日
摘要: 如下:publicvoiddeleteById(intid){Useru=newUser(); u.setId(id);hibernateTemplate.delete(u);} 阅读全文
posted @ 2014-11-11 00:15 chuansao 阅读(1847) 评论(0) 推荐(0) 编辑
  2014年11月7日
摘要: xmlns:context="http://www.springframework.org/schema/context"http://www.springframework.org/schema/contexthttp://www.springframework.org/schema/contex... 阅读全文
posted @ 2014-11-07 15:58 chuansao 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 用的是eclipse。注册jsp的文字编码需要是GB18030或者GBK,如下:在web.xml文件里加(在struts2的filter前面):encodingFilterorg.springframework.web.filter.CharacterEncodingFilterencodingGB... 阅读全文
posted @ 2014-11-07 00:33 chuansao 阅读(168) 评论(0) 推荐(0) 编辑
  2014年11月5日
摘要: 如List list = new ArrayList(),List是接口,ArrayList是其实现。类似的Dao与DaoImpl;Manager与ManagerImpl 阅读全文
posted @ 2014-11-05 23:55 chuansao 阅读(177) 评论(0) 推荐(0) 编辑