Springboot 1.引入Freemarker jar包 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-freemarker</artifactId> </depe ...
分类:
编程语言 时间:
2020-06-04 10:27:08
阅读次数:
56
启动新建的 SpringMVC项目,访问接口 404 控制台日志为 :java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet 初步判断可能是jar包的原因,因为编译输出的out文件夹中没有 ...
分类:
编程语言 时间:
2020-06-03 15:17:39
阅读次数:
63
#Spring Security <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> Spring B ...
分类:
编程语言 时间:
2020-06-03 13:56:42
阅读次数:
56
cosumer方 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema ...
分类:
其他好文 时间:
2020-06-03 09:24:36
阅读次数:
57
如果不配置spring的事务,那么默认每次执行dao层方法即自动提交事务。 <!--配置事务管理器--> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionMan ...
分类:
编程语言 时间:
2020-06-03 00:53:45
阅读次数:
83
1、只需在web.xml中配置即可 <filter> <filter-name>encodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-clas ...
分类:
编程语言 时间:
2020-06-03 00:36:08
阅读次数:
102
注意需要引入spring的架包,spring-core-xxxxx1.PropertiesUtil.java package com.h3c.portal.business.common.util; import org.springframework.core.io.support.Propert ...
分类:
编程语言 时间:
2020-06-02 18:36:44
阅读次数:
112
CollectionUtils工具类 CollectionUtils工具类是在apache下的,而不是springframework下的CollectionUtils 个人觉得在真实项目中CollectionUtils,可以使你的代码更加简洁和安全 下面我们就一起来探究一下 先从maven官方找到最 ...
分类:
编程语言 时间:
2020-06-02 13:11:37
阅读次数:
46
在spring配置文件中配置:<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLS ...
分类:
其他好文 时间:
2020-06-01 23:30:22
阅读次数:
61
编写spring的配置文件: <?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLS ...
分类:
其他好文 时间:
2020-06-01 23:29:30
阅读次数:
61