![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springboot
贼心~不死
这个作者很懒,什么都没留下…
展开
-
springboot利用AbstractRoutingDataSource实现动态切换数据源
需求:编写一个代码生成器,前端下拉选择需要自动生成代码的数据库名。后端切换数据库并且生成对应的代码。动态切换数据源:springboot提供了一个AbstractRoutingDataSource类。我们可以实现一个类继承AbstractRoutingDataSource并且determineCurrentLookUpKey()方法。具体步骤:数据源配置spring: datasource: type: com.alibaba.druid.pool.DruidDataSource原创 2021-05-29 15:20:09 · 350 阅读 · 0 评论 -
springboo+shiro+redis实现登录demo
项目结构:User实体类:package com.shirodemo.bean;import java.io.Serializable;public class User implements Serializable { private int id; private String username; private String password; ...原创 2020-04-28 21:15:27 · 340 阅读 · 0 评论 -
springboot+Vue+ElementUI+PageHelper实现分页
1. springboot整合PageHelper(1)加入依赖<dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> ...原创 2020-04-19 07:52:28 · 2176 阅读 · 0 评论