![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java
文章平均质量分 52
村西
这个作者很懒,什么都没留下…
展开
-
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 · 76 阅读 · 0 评论 -
springboot配置多数据源,根据mapper接口所在的包位置不同动态访问不同的数据源
假如我们要访问两个数据源,那么我们要添加两个数据源的配置类:XXXDataSourceConfig,如果是三个,就创建三个配置类。。。@Configuration@MapperScan(basePackages = ADataSourceConfig.PACKAGE, sqlSessionFactoryRef = "productSqlSessionFactory")public class ADataSourceConfig { static final String PACKAGE原创 2021-05-08 15:32:40 · 2440 阅读 · 0 评论 -
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 · 11159 阅读 · 0 评论