Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanxuegui committed Nov 12, 2018
2 parents 4bb6a65 + bf4d8b8 commit 28ecacf
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.hexagonframework.boot</groupId>
<artifactId>spring-data-ebean-spring-boot</artifactId>
<version>1.4.0.RELEASE</version>
<version>2.0.0.RELEASE</version>
<name>spring-data-ebean-spring-boot</name>
<description>Spring boot support for spring data ebean</description>
<packaging>pom</packaging>
Expand Down Expand Up @@ -45,8 +45,8 @@
</modules>

<properties>
<spring-boot.version>2.0.0.RELEASE</spring-boot.version>
<spring-data-ebean.version>1.4.0.RELEASE</spring-data-ebean.version>
<spring-boot.version>2.1.0.RELEASE</spring-boot.version>
<spring-data-ebean.version>2.0.0.RELEASE</spring-data-ebean.version>
</properties>

<profiles>
Expand Down
8 changes: 7 additions & 1 deletion spring-boot-autoconfigure-data-ebean/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.github.hexagonframework.boot</groupId>
<artifactId>spring-data-ebean-spring-boot</artifactId>
<version>1.4.0.RELEASE</version>
<version>2.0.0.RELEASE</version>
</parent>
<artifactId>spring-boot-autoconfigure-data-ebean</artifactId>
<name>spring-boot-autoconfigure-data-ebean</name>
Expand All @@ -23,6 +23,12 @@
<artifactId>spring-data-ebean</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean</artifactId>
<version>11.21.1</version>
<optional>true</optional>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ public Object currentUser() {

@SuppressWarnings("SpringJavaAutowiringInspection")
@Bean
public ServerConfig defaultEbeanServerConfig(DataSource dataSource, CurrentUserProvider currentUserProvider) {
@ConditionalOnMissingBean
public ServerConfig serverConfig(DataSource dataSource, CurrentUserProvider currentUserProvider) {
ServerConfig config = new ServerConfig();

config.setDataSource(dataSource);
Expand All @@ -89,8 +90,9 @@ public ServerConfig defaultEbeanServerConfig(DataSource dataSource, CurrentUserP
}

@Bean
public EbeanServer defaultEbeanServer(ServerConfig defaultEbeanServerConfig) {
return EbeanServerFactory.create(defaultEbeanServerConfig);
@ConditionalOnMissingBean
public EbeanServer ebeanServer(ServerConfig serverConfig) {
return EbeanServerFactory.create(serverConfig);
}

@Bean
Expand Down
2 changes: 1 addition & 1 deletion spring-boot-starter-data-ebean/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.github.hexagonframework.boot</groupId>
<artifactId>spring-data-ebean-spring-boot</artifactId>
<version>1.4.0.RELEASE</version>
<version>2.0.0.RELEASE</version>
</parent>
<artifactId>spring-boot-starter-data-ebean</artifactId>
<name>spring-boot-starter-data-ebean</name>
Expand Down

0 comments on commit 28ecacf

Please sign in to comment.