![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
springboot
springboot
冬风孤立
哈哈
展开
-
spring jpa nativeQuery
spring jpa nativeQuery原创 2022-12-07 10:59:56 · 646 阅读 · 1 评论 -
springboot 配置多数据源
本项目一共配置了两个数据源,一个连接本地数据库,一个通过ssh连接的远程数据库。1.Dependencies2.数据源配置3.配置目录4.DataSourceConfig5.FirstConfig6.SecondConfig7.ReWriteSecond8.SSHConnection9.SSHContextListener原创 2022-12-07 10:36:15 · 686 阅读 · 0 评论 -
fastjson 转换通用接口响应json为对象
【代码】fastjson 转换通用接口响应json为对象。原创 2022-09-23 15:48:35 · 312 阅读 · 0 评论 -
easypoi 实现多sheet导出excel
添加依赖 //excel implementation group: 'cn.afterturn', name: 'easypoi-spring-boot-starter', version: '4.1.0'实现 public void download(HttpServletResponse response, String schoolName, String start, .原创 2022-02-28 17:32:08 · 3082 阅读 · 0 评论 -
spring jpa多条件时间分页查询
@GetMapping("/queryFiles") @NeedLog public Object queryFiles(QueryFiles query, int page, int limit){ return resourceService.queryFiles(query,page,limit); } @Override public Object queryFiles(QueryFiles query, int page, int lim...原创 2022-01-24 18:30:51 · 578 阅读 · 1 评论 -
vue springboot前后端分离 文件预览
vue springboot前后端分离 文件预览原创 2022-01-18 18:04:36 · 1109 阅读 · 0 评论 -
inputStream和outputStream互相转换
inputStream转换成outputStreampackage org.example.base.controller;import lombok.AllArgsConstructor;import org.springframework.web.bind.annotation.GetMapping;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind原创 2021-05-25 16:24:56 · 11512 阅读 · 0 评论 -
easypoi excel模板导出pdf
sdf原创 2021-05-21 11:17:58 · 2508 阅读 · 2 评论 -
springboot获取客户端ip工具类
package org.example.base.util;import lombok.extern.slf4j.Slf4j;import javax.servlet.http.HttpServletRequest;import java.net.InetAddress;import java.net.UnknownHostException;/** * @author l * @date Created in 2021/1/27 14:56 */@Slf4jpublic clas原创 2021-03-19 11:34:23 · 421 阅读 · 0 评论 -
springboot2简单配置restTemplate
package org.example.es.config;import org.apache.http.client.config.RequestConfig;import org.apache.http.config.SocketConfig;import org.apache.http.impl.client.CloseableHttpClient;import org.apache.http.impl.client.HttpClients;import org.apache.http.im原创 2021-03-17 15:19:33 · 369 阅读 · 0 评论 -
springboot2整合redis使用lettuce连接池(解决lettuce连接池无效问题)
添加依赖dependencies { implementation 'org.springframework.boot:spring-boot-starter-jdbc' implementation 'org.springframework.boot:spring-boot-starter-data-redis' implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implem.原创 2020-11-12 16:53:33 · 32887 阅读 · 9 评论 -
springboot2整合redis的两种使用方式
使用RedisTemplate添加gradle依赖dependencies { implementation 'org.springframework.boot:spring-boot-starter-jdbc' implementation 'org.springframework.boot:spring-boot-starter-data-redis' implementation 'org.springframework.boot:spring-boot-starter原创 2020-11-11 15:33:03 · 562 阅读 · 2 评论 -
Swagger2开启登陆权限控制
swagger-bootstrap-ui原创 2020-11-02 16:09:03 · 6616 阅读 · 0 评论 -
springboot集成本地缓存Caffeine的三种使用方式
第一种方式(只使用Caffeine)gradle添加依赖dependencies { implementation 'org.springframework.boot:spring-boot-starter-jdbc' implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'org.springframework.boot:spring-boot-star原创 2020-10-29 17:15:12 · 4854 阅读 · 2 评论 -
gradle构建多模块springboot项目
项目使用版本编辑器:Intellij IDEA 2019.3构建工具:Gradle4.4.1SpringBoot版本:1.创建项目2.点击next进入,输入项目名称3.点击finish进入,显示gradle初始化项目失败。4.打开Settings ,对项目构建工具进行设置,选择本地安装好的gradle-4.4.1,应用保存。5.点击 Reimport All Gradle Projects,项目就正常了。6.也可以使用不同版本的gradle,如下操作,使用gradle-5.原创 2020-10-26 17:41:24 · 1016 阅读 · 0 评论 -
springmvc aop 记录controller通用日志
1.首先自定义一个注解package com.example.demo.annotation;import java.lang.annotation.Retention;import java.lang.annotation.RetentionPolicy;import java.lang.annotation.Target;import static java.lang.annotation.ElementType.METHOD;@Target({METHOD})@Retention(原创 2020-09-10 22:19:18 · 570 阅读 · 0 评论