- 博客(3)
- 资源 (1)
- 收藏
- 关注
原创 Java最简单的死锁样例
废话不多说,talk is cheap show me the code: public static void main(String[] args) { String s1 = "1"; String s2 = "2"; new Thread(()->{ synchronized (s1){ System.out.println(s1); try { Thread.sleep(.
2021-05-18 17:33:50
106
原创 springboot配置多数据源,根据mapper接口所在的包位置不同动态访问不同的数据源
假如我们要访问两个数据源,那么我们要添加两个数据源的配置类:XXXDataSourceConfig,如果是三个,就创建三个配置类。。。 @Configuration @MapperScan(basePackages = ADataSourceConfig.PACKAGE, sqlSessionFactoryRef = "productSqlSessionFactory") public class ADataSourceConfig { static final String PACKAGE
2021-05-08 15:32:40
2528
原创 mybatis 时间范围查询
mybatis框架支持直接用>=或<=查询日期范围,如: <if test="startTime != null and startTime != ''"> and timer.create_time >= #{startTime} <if test="endTime != null and endTime != ''"> and timer.create_time <= #{endTime} </if>...
2021-05-08 14:46:54
11309
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人