- 博客(9)
- 资源 (7)
- 收藏
- 关注
原创 maven打包后运行:Error: Could not find or load main class ‐jar
在pom.xml文件中添加如下:<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <conf
2021-01-06 00:51:59
1896
1
原创 fastjson工具的使用
添加pom.xml依赖<dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.47</version> </dependency>测试类测试@Test public void test3.
2021-01-05 17:06:45
165
原创 Lombox的使用(maven)
在idea中下载Lombox的插件!](https://img-blog.csdnimg.cn/20210105094006393.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80NzI0OTg2OQ==,size_16,color_FFFFFF,t_70)在pom.xml文件中添加Lombox的依赖<depend.
2021-01-05 09:46:14
197
原创 自定义日期格式
使用util包下的Date创建的对象为一个Timestamp(时间戳)Date date = new Date();要想自定义日期格式,可以创建SimpleDateFormat对象,通过使用该对象的format()方法来自定义日期格式.Date date = new Date();SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");String format = sdf.format(date);..
2021-01-04 20:23:21
700
原创 利用Jackson解决Json乱码问题
导入Jackson依赖:<dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.10.0</version> </dependency>在sprin.
2021-01-04 19:51:26
996
转载 使用spring的过滤器
直接在web.xml中配置: <filter> <filter-name>encoding</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encod
2021-01-04 17:44:22
77
原创 完整的filter过滤器的编写
编写Filter实现类package com.kuang.filter;import javax.servlet.*;import java.io.IOException;/** * @ClassName EncondingFilter * @Author yin cun yu * @date 2021.01.04 17:19 */public class EncondingFilter implements Filter { public void init(Filte.
2021-01-04 17:36:01
345
原创 springmvc-servlet.xml固定配置
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="h
2020-12-29 11:18:22
143
原创 Maven中资源导出问题解决方案--pom.xml配置
<build> <resources> <resource> <directory>src/main/resources</directory> <includes> <include>**/*.properties</include>
2020-12-29 11:15:35
221
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人