
spring
文章平均质量分 86
getdate
getdate2006@163.com
展开
-
spring 动态创建bean
应用场景:查询业务为主,多个数据源,根据不同的请求,切换到不同的数据源; 1:创建DynamicDataSource 扩展一个Spring提供的AbstractRoutingDataSource,Override 其中的 determineCurrentLookupKey方法实现数据源的路由 import java.sql.SQLException; import javax.sql原创 2014-02-27 16:51:14 · 22207 阅读 · 4 评论 -
Springboot 2.1.5 单元测试
controller import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * @De...原创 2019-06-04 14:03:47 · 769 阅读 · 0 评论