
SpringBoot
夕阳西下,断肠人在天涯
加班?哈?
展开
-
AOP 实现@Async异步事务管理
AOP+编程式事务现实异步事务控制原创 2023-06-27 23:30:00 · 865 阅读 · 0 评论 -
springboot+JTA简单实现多数据源事务
JTA,即Java Transaction API,JTA允许应用程序执行分布式事务处理——在两个或多个网络计算机资源上访问并且更新数据。原创 2023-06-25 12:00:31 · 856 阅读 · 0 评论 -
springboot集成redisson
springboot集成redisson。原创 2023-02-18 19:35:52 · 210 阅读 · 1 评论 -
Springboot+ES : ElasticsearchRepository
【代码】Springboot+ES : ElasticsearchRepository。原创 2022-10-08 16:50:45 · 806 阅读 · 0 评论 -
注解方式实现logback日志脱敏
logback日志脱敏原创 2022-09-21 19:58:21 · 2277 阅读 · 1 评论 -
springboot + easyRules 搭建规则引擎服务
规则引擎原创 2022-09-16 11:57:44 · 3499 阅读 · 2 评论 -
mybatis xml : 前言中不允许有内容。
网上基本的说法是Mapper.xml文件编码问题,改utf-8-bom,还是utf-8什么的。但是我的配置文件检查了N次没问题。其实是mybatis的路径配置问题引起的:改成如下:原创 2022-07-04 21:30:00 · 1079 阅读 · 0 评论 -
springboot集成nacos配置中心
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.apache.org/POM/4.0.0 https://maven.apache.org/xsd/mav原创 2022-03-02 15:58:56 · 599 阅读 · 0 评论 -
Springboot + Retryable
1. pom.xml <dependency> <groupId>org.springframework.retry</groupId> <artifactId>spring-retry</artifactId> </dependency> <dependency> <groupId>org.原创 2021-12-10 08:55:01 · 765 阅读 · 0 评论 -
Cannot enhance @Configuration bean definition ‘dataSourceConfig‘ since its singleton instanc .......
1.背景Springboot+mybatis配置多数据源时启动提示以下信息:[ restartedMain] o.s.c.a.ConfigurationClassPostProcessor : Cannot enhance @Configuration bean definition 'dataSourceConfig' since its singleton instance has been created too early. The typical cause is a non-static原创 2021-04-19 08:50:54 · 2396 阅读 · 0 评论 -
Springboot + Mybatis + 多数据源配置
pom.xml其他依赖省略了,这里只举出数据源相关的。 <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.1.4</version> </dependency> <dependenc原创 2021-03-20 17:00:51 · 134 阅读 · 0 评论 -
Springboot + logback 分级别输出日志
application.yml# 日志框架logging: config: classpath:logback-spring.xml file: path: loglogback-spring.xml<?xml version="1.0" encoding="UTF-8"?><configuration debug="false"> <!--日志文件主目录:程序目录--> <property resource="a.原创 2021-03-10 10:05:29 · 587 阅读 · 0 评论 -
Springboot jar 获取程序目录
Springboot项目打成jar包后,需要获取同目录下额外的资源,可以使用以下方法获取路径:System.getProperty("user.dir");jar包路径:D:/gyiot/socket_service.jar输出为:D:/gyiot原创 2021-03-10 10:22:29 · 351 阅读 · 0 评论 -
Springboot 定时任务
pom.xml添加quartz依赖<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-quartz</artifactId></dependency>Application.java添加@EnableScheduling注解@SpringBootApplication@EnableSc.原创 2021-03-10 10:40:08 · 323 阅读 · 0 评论 -
The server time zone value xxxxxxx is unrecognized or represents more than one time zone.
环境SpringBootmybatis问题项目启动时报错java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to原创 2020-06-05 11:47:58 · 22907 阅读 · 0 评论