- 博客(15)
- 资源 (1)
- 收藏
- 关注
原创 springboot中使用easypoi导出excel表格
引入pom依赖 <dependency> <groupId>cn.afterturn</groupId> <artifactId>easypoi-spring-boot-starter</artifactId> <version>4.2.0</version> &l.
2021-05-21 14:23:48
292
原创 Springboot整合redis操作
pom文件引用 <!--Redis--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency>在配置文件中配置redisspr
2021-05-17 10:22:53
203
原创 Springboot整合kafka
创建springboot工程(此处省略一万字)修改pom.xml文件 <dependency> <groupId>org.springframework.kafka</groupId> <artifactId>spring-kafka</artifactId> </dependency>配置ymlspring: kafka: # kafka服.
2021-03-19 10:18:39
333
原创 java实现word转成pdf文件
word转成PDF /** * word文档转成pdf(doc、docx、txt) * @param oldFilePath 旧文件地址 * @param toFilePath 生成文件地址 * @param suffix 文件后缀 * @return */ public static boolean wordtoPDF(String oldFilePath, String toFilePath,String suffix){
2021-03-10 09:10:07
276
原创 使用ApachePOI导出excel(多个sheet页)
定义代码表转换private static final Map<String,String> codeMap = new HashMap<String, String>();static{ codeMap.put("prsc","BSIN_PRSC"); codeMap.put("rstp","BSIN_RSTP");}1、查询出要导出的数据集合//查询返回数据 - list集合List<zcdjxxCxExcelVo> list = dsmSmBsin
2020-09-10 14:12:49
1207
原创 简单的sql优化
避免where中出现orselect id from table where num=10 or num=20select id from table where num=10union allselect id from table where num=20查询时避免使用in和not in连续数值select id from table where num in(1,2,3)select id from table where num between 1 and 3应尽.
2020-09-10 10:09:16
202
原创 java读取xxx.properties文件
在项目中会有很多地方用到同一个东西,类似图片服务器,如果每个人都单独写一个方法来调用图片服务器的话,不但代码后期不好维护,而且如果图片服务器修改了的话会修改很多。那就要写一个公共方法,并且把图片服务器地址放到配置文件里1、配置xxx.properties文件#服务器ip地址file_ip=http://127.0.0.1#服务器端口号file_port=80802、配置工具类 /** * 创建Properties类 */ private static Proper
2020-09-10 10:02:33
181
原创 springboot集成redis缓存
引入redis依赖 <!-- redis依赖包 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency>在application..
2020-09-07 15:11:57
160
原创 spring boot 项目中实现spring-boot-devtools 热部署
为什么要使用到热部署?在开发过程中避免不了修改后台代码,在没有使用热部署之前需要手动重启后台。如果在项目中配置了热部署的话,修改完后台代码只需要稍等片刻就可以生效了如何在springboot项目中使用到热部署呢?使用spring-boot-devtools来实现在热部署首先需要引入jar包依赖<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-.
2020-06-02 13:57:58
331
原创 springboot整合log4j2日志框架
引入log4j2依赖 <!-- log4j2依赖包 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-log4j2</artifactId> </dependency>解决冲突(log4j2会与web下
2020-05-28 17:51:17
255
原创 搭建springboot+mybatis+mysql+swagger
创建springboot项目配置maven创建springboot项目一直next就可以穿件完成了创建包配置application.ymlspring: datasource: url: jdbc:mysql://127.0.0.1:3306/ssm?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 username: root password:
2020-05-22 17:32:07
636
原创 使用swagger测试完接口生成接口文档
需要在pom文件中添加依赖 <!--将swagger测试接口生成的api转成word--> <dependency> <groupId>io.github.swagger2markup</groupId> <artifactId>swagger2markup</artifactId> <version>1.3.1</version> </depen
2020-05-11 17:41:15
698
原创 ssm集成swagger接口测试框架
在pom文件中添加依赖<dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.8.0</version> </dependency> <dependency> <groupId>io
2020-05-11 17:32:57
364
原创 Java8新特性,Lamdba、方法引用、Function、BiFunction、Comparable
一、java8新特性Lamdba表达式语法:(参数) -> {方法体};未使用Lamdba表式://查询所有用户List<User> user = userService.selectUserAll();使用Lamdba表达式://根据id查询单个用户信息Function<Integer, User> fun = (x) -> { return userService.selectUserById(x);};User user = fun.appl
2020-05-11 14:05:12
497
原创 使用IntelliJ IDEA 搭建ssm框架(maven)
首先创建一个maven项目创建包,以及项目名称引入pom文件依赖包<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM
2020-05-11 09:55:38
276
swagger-ui-master.zip
2020-05-11
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人