一、正常乱码过滤器 web.xml <filter> <filter-name>encoding</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <in ...
分类:
编程语言 时间:
2020-07-20 10:45:28
阅读次数:
79
一、环境 1、导入包 maven 2、xml配置文件 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3. ...
分类:
编程语言 时间:
2020-07-19 00:32:25
阅读次数:
87
前后端项目分离,跨域请求时,后端的两种配置方式: 1.配置类: package com.helq3.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annot ...
分类:
编程语言 时间:
2020-07-18 21:52:43
阅读次数:
86
今日学习Springmvc遇见一个bug,在配置视图解析器的时候,后缀配得是.html,路径完全正确的情况下,视图解析器解析不到。换jsp文件可以正常访问 <bean id="InternalResourceViewResolver" class="org.springframework.web.s ...
分类:
编程语言 时间:
2020-07-18 15:27:13
阅读次数:
98
import org.apache.commons.lang3.StringUtils;import org.springframework.util.ObjectUtils; public static boolean writeData2File(String exportPath,String ...
分类:
编程语言 时间:
2020-07-18 11:22:03
阅读次数:
85
自定义注解动态拼接查询条件 QueryWapper自定义注解 import com.supconit.its.generator.enums.QueryWapperEnum; import org.springframework.stereotype.Indexed; import java.lan ...
分类:
其他好文 时间:
2020-07-18 11:18:43
阅读次数:
105
问题:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener 解决:rebuild project 问题:service实现类注入dao失败 解决:dao或者service的配置文 ...
分类:
其他好文 时间:
2020-07-18 00:41:34
阅读次数:
76
一、建一个项目,勾选相关需要的依赖; 二、 1) 导入redis 依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> < ...
分类:
编程语言 时间:
2020-07-17 09:20:07
阅读次数:
65
Java-byte转换 1 import org.springframework.stereotype.Component; 2 import org.springframework.util.StringUtils; 3 4 import java.io.*; 5 6 /** 7 * byte和各 ...
分类:
编程语言 时间:
2020-07-16 21:22:56
阅读次数:
81
一、pom文件引入所需jar <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> <depende ...
分类:
编程语言 时间:
2020-07-16 21:12:01
阅读次数:
79