类org.springframework.boot.autoconfigure.liquibase.LiquibaseDataSource源码实例Demo

下面列出了怎么用org.springframework.boot.autoconfigure.liquibase.LiquibaseDataSource的API类实例代码及写法,或者点击链接到github查看源代码。

@Bean
@ConfigurationProperties("spring.datasource")
@LiquibaseDataSource
public DataSource dataSource(DataSourceProperties properties) {
	return new SimpleDriverDataSource(new org.postgresql.Driver(), properties.getUrl(),
			properties.getDataUsername(), properties.getDataPassword());
}
 
@Bean
@ConfigurationProperties("spring.datasource")
@LiquibaseDataSource
public DataSource dataSource(DataSourceProperties properties) {
	return new SimpleDriverDataSource(new org.postgresql.Driver(), properties.getUrl(),
			properties.getDataUsername(), properties.getDataPassword());
}
 
 同包方法