Skip to content

Commit

Permalink
Modified in-memory datasource to replace existing datasource.
Browse files Browse the repository at this point in the history
  • Loading branch information
dartartem committed Jun 23, 2020
1 parent 385e21f commit 42fc179
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
import io.eventuate.common.inmemorydatabase.EventuateDatabaseScriptSupplier;
import io.eventuate.common.inmemorydatabase.EventuateInMemoryDataSourceBuilder;
import io.micronaut.context.annotation.Factory;
import io.micronaut.context.annotation.Replaces;

import javax.inject.Singleton;
import javax.sql.DataSource;
import java.util.List;

@Factory
public class EventuateCommonInMemoryDatabaseFactory {

@Singleton
@Replaces(DataSource.class)
public DataSource dataSource(List<EventuateDatabaseScriptSupplier> scripts) {
return new EventuateInMemoryDataSourceBuilder(scripts).build();
}

}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ micronautDataVersion=1.0.0.M3

eventuateUtilVersion=0.5.0.RELEASE

version=0.9.0-SNAPSHOT
version=0.11.0-SNAPSHOT

0 comments on commit 42fc179

Please sign in to comment.