![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
服务器开发
中年油腻男人的转型之路
这个作者很懒,什么都没留下…
展开
-
【Spring】使用log4j2打印日志,项目启动时没有日志打印
今天在重构项目的时候, 把原来的log4j2-*.xml替换成log4j2.yml, 导致项目启动不报错,但也没有任何打印。最后调试发现原来是确少读取yml文件的jar包,在pom.xml文件中添加如下依赖即可。<dependency> <groupId>com.fasterxml.jackson.dataformat</groupId> ...原创 2020-01-03 23:17:28 · 1026 阅读 · 0 评论 -
[Spring MVC]纯注解配置完成慕课网张老师的秒杀系统
慕课网yijun zhang老师的秒杀系统是很好的学习Spring MVC的课程.张老师的代码是基于Xml配置的.而Spring in action4的作者Craig Walls在书中推荐使用Java Config进行无xml的配置.所以我借鉴书中的知识, 通过java config配置了spring相关配置, druid, mybatis, redis.如需要完整代码的朋友, 可以私信...原创 2019-07-20 23:26:18 · 127 阅读 · 0 评论 -
[Spring] Jasypt安全框架为datasource密码加密
1. 增加依赖<dependency> <groupId>org.jasypt</groupId> <artifactId>jasypt-spring31</artifactId> <version>1.9.2</version></dependency>2. 编写Encrypt...原创 2019-06-05 23:03:31 · 702 阅读 · 0 评论 -
[SpringBoot]在Idea中使springboot支持jsp页面的注意事项
详细步骤网上很多, 转一个备用. 这里主要讲下要注意的事项1. pom文件里千万不能增加 spring-boot-starter-thymeleaf依赖, 否则会报下面的错误, 原因也想想也很简单, 如果导入了thymeleaf的包, 则会从thymeleaf的目录结构查找index.jsp.org.thymeleaf.exceptions.TemplateInputException...转载 2018-10-09 23:42:07 · 840 阅读 · 0 评论 -
[转] 新手学Linux:在VMware14中安装CentOS7详细教程及经验
转自:https://blog.csdn.net/yiyihuazi/article/details/78557216这里说下自己遇到一个坑.1. 如果在公司内部, 虚拟机上网可能 需要设置代理, 方法如下:在文件后面加上 http_proxy=http://xxxx export http_proxy #保存退出,执行source /etc/profile...转载 2018-06-12 23:43:23 · 387 阅读 · 0 评论 -
[spring mybatis]java.sql.SQLException: An attempt by a client to checkout a Connection has timed out
在照抄张老师的秒杀系统的时候, 运行junit测试函数testQueryById, 遇到"java.sql.SQLException: An attempt by a client to checkout a Connection has timed out."问题. 折腾了两个小时解决. 总结如下.1. 首先可以通过mysql的客户端排除SecKillDao.xml本身错误2. 在tracest...原创 2018-05-06 23:05:33 · 4544 阅读 · 0 评论 -
new ConnectionFactory();异常
运行rabbitMQ示例时, 遇到一个问题, 下面代码在newfactory后一直跳到finally分支, 看不到任何原因的exception.其实是因为缺少slf4j jar包, 添加就可以了. 这里有一个小技巧, catch的时候 catch throwable类而不是Exception即可以看到异常原因. try { factory = new Co...原创 2018-02-08 21:35:13 · 944 阅读 · 0 评论 -
Spring MVC 框架pom.xml, web.xml, spring-mvc-servlet.xml, security.xml相关知识学习
新手在学习Spring框架时, 对了上面提到的xml文件里很多语法都不太理解.本文的目的, 是记录在学习SPRING MVC的过程中, 遇到的疑问, 后续不断更新.所有知识都是网上百度而来, 不一一列举来源.一. context-param & init-param 参考: http://blog.csdn.net/fupengyao/article/details/50605954作用...原创 2018-02-27 13:50:33 · 360 阅读 · 0 评论 -
[Server][Maven] maven-archetype-webapp-1.0.jar加载失败问题解决.
虽然网上有很多种解决办法, 但是我尝试之后都失败.现分享下自己最终解决的办法, 供大家参考.步骤如下:1. 在命令行运行mvn archetype:generate -DgroupId=org.apache.maven.archetypeslyndon -DartifactId=lyndon-archetype-webapp -DarchetypeArtifactId=maven-archetyp原创 2018-01-19 13:49:42 · 1902 阅读 · 0 评论 -
[SPRING]setCallback(Callback) in the type Enhancer is not applicable for the arguments (CGLibProxy)
如下代码报错:The method setCallback(Callback) in the type Enhancer is not applicable for the arguments (CGLibProxy)package com.xxx.aopProxy;import java.lang.reflect.Method;//注意此处引入的头文件应该为s原创 2018-01-25 19:17:14 · 1462 阅读 · 2 评论