![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SpringBoot
KBXH
这个作者很懒,什么都没留下…
展开
-
SpringBoot整合JSP打成jar包运行
pom.xml<?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....原创 2019-06-27 15:01:24 · 270 阅读 · 0 评论 -
自定义SpringBoot-Starter
使用SpringBoot-Starter的好处:开发者只需要依赖相应功能的Starter,Spring Boot就能自动扫描并加载相应的模块,将模块所需的依赖整合起来并对模块内的Bean根据条件进行自动配置,无需做过多的配置和依赖。例如我想要在SpringBoot项目中集成SpringMVC,那么我只需要加入spring-boot-starter-web的依赖,不需要其他依赖和配置,就可以使用...原创 2019-07-14 12:16:30 · 255 阅读 · 0 评论 -
springboot + dubbo + seata 实现分布式事务
1、下载seata的demo ,https://github.com/seata/seata-samples, 使用其中的springboot-dubbo-seata2、下载nacos-server , https://github.com/alibaba/nacos/releases 暂不使用数据库和集群, 直接启动即可, 访问http://127.0.0.1:...原创 2019-07-29 12:06:11 · 1414 阅读 · 0 评论 -
springboot + dubbo + nacos + seata 实现分布式事务
1、部署 nacos-server 见https://blog.csdn.net/u013792404/article/details/984791902、部署 seata-server 下载seata-server , https://github.com/seata/seata/releases 修改配置文件:全部使用fileregistry.c...原创 2019-08-05 16:59:44 · 2912 阅读 · 2 评论 -
使用WebSocket实现网页声音提醒
1、SpringBoot整合WebSocket <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-websocket</artifactId> </dependency&...原创 2019-08-08 10:40:42 · 2864 阅读 · 0 评论 -
SpringBoot动态切换数据源
在执行业务方法之前,利用SpringAOP进行拦截处理,将符合条件(自己定义规则)的数据源存到ThreadLocal中, 执行业务方法的时候从ThreadLocalh中取出数据源,业务方法执行完后删除ThreadLocal中的数据源。下次处理执行相同的操作。<?xml version="1.0" encoding="UTF-8"?><project xmlns="h...原创 2019-08-23 17:27:53 · 367 阅读 · 0 评论 -
SpringBoot打包所有依赖jar包和配置文件全部分离
常规的springboot打包后,只生成一个jar包,配置文件和所有依赖包都在一起,当有一点点改动,上线时需要把整个包发布上去,有些不太方便。pom.xml配置<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi=...原创 2019-08-15 14:33:38 · 9110 阅读 · 2 评论 -
SpringBoot + mybatis + pageHelper 简单使用
1、导包 <!-- springboot 整合 mybatis jar包 --> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId&...原创 2019-09-24 18:30:09 · 208 阅读 · 0 评论 -
springboot + dubbo + zookeeper
0、服务接口一个简单的maven工程,暂无需任何依赖<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/4.0.0 http...原创 2019-09-25 14:41:45 · 128 阅读 · 0 评论 -
SpringBoot整合Redis
redis 的依赖引用: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> &...原创 2019-06-29 12:07:48 · 71 阅读 · 0 评论 -
SpringBoot使用JdbcTemplate
<!-- springboot 整合 jdbcTemplate jar包 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> </...原创 2019-06-29 11:52:27 · 450 阅读 · 0 评论 -
SpringBoot + JSP 打war包部署
pom.xml<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/4.0.0 http://maven.apache.org/xs...原创 2019-09-19 14:47:54 · 223 阅读 · 0 评论 -
SpringBoot整合fastdfs
1、导入jar包<dependency> <groupId>com.github.tobato</groupId> <artifactId>fastdfs-client</artifactId> <version>1.26.5</version...原创 2019-05-25 18:33:27 · 14345 阅读 · 10 评论 -
spring-boot-devtools不起作用
开发时导入了spring-boot-devtools<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope>...原创 2019-06-02 00:13:16 · 1234 阅读 · 0 评论 -
SpringBoot整合log4j
引入maven依赖 <!-- springboot 整合 log4j --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> &...原创 2019-06-29 11:32:34 · 125 阅读 · 0 评论 -
SpringBoot整合Servlet
1、通过注解扫描完成 Servlet <!-- SpringBoot 使用 SpringMVC --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</...原创 2019-06-29 11:37:43 · 138 阅读 · 0 评论 -
SpringBoot整合 Filter
1、通过注解扫描完成 Filter组件的注册<!-- SpringBoot 使用 SpringMVC --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifac...原创 2019-06-29 11:42:12 · 129 阅读 · 0 评论 -
SpringBoot整合Listener
1、通过注解扫描完成 Listener组件的注册/*** springBoot 整合 Listener**<listener>* <listener-class>com.listener.MyListener</listener-class>*</listener>*/@WebListenerpublic class My...原创 2019-06-29 11:46:02 · 1012 阅读 · 0 评论 -
SpringBoot上传图片+ 添加文字水印
<?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.o...原创 2019-09-29 12:06:50 · 2071 阅读 · 0 评论