![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springboot
Patrick Choi
这个作者很懒,什么都没留下…
展开
-
Spring Boot 自动配置
在Spring中假设我们要使用一个数据源,必须在配置DataSource才能使用,但是使用了Spring Boot这些就不存在了,相当于Spring Boot为我们做了很多配置的工作。Spring 4提供了一个更通用的基于条件的Bean的创建方式,即使用@Conditional(实现Condition.class)注解。以下Spring Boot自定义的条件化注解,它们定义了Condition的扩...原创 2018-04-22 22:25:26 · 149 阅读 · 0 评论 -
springboot配置profiles
在项目中,分生产、测试、开发环境等,所以profile配置是必不可少的。 springboot配置profiles只需要两步。 1、application.properties加上profiles配置 spring.profiles.active=prod 2、新增 application-prod.properties 这样就可以自由切换配置。...原创 2018-08-07 22:44:02 · 318 阅读 · 0 评论 -
springboot集成druid数据源
springboot默认使用Hikari数据源,只需要在application.properties配置 # rbac database spring.datasource.rbac.driver-class-name=com.mysql.jdbc.Driver spring.datasource.rbac.url=jdbc:mysql://xxxxxxxxxxxxxxxxxx spring....原创 2018-08-08 09:35:46 · 192 阅读 · 0 评论