File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
src/test/java/org/soujava/demos/mongodb/document Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 33import jakarta .annotation .Priority ;
44import jakarta .enterprise .context .ApplicationScoped ;
55import jakarta .enterprise .inject .Alternative ;
6+ import jakarta .enterprise .inject .Default ;
67import jakarta .enterprise .inject .Produces ;
78import jakarta .interceptor .Interceptor ;
8- import org .eclipse .jnosql .databases .mongodb .communication .MongoDBDocumentManager ;
9+ import org .eclipse .jnosql .communication .semistructured .DatabaseManager ;
10+ import org .eclipse .jnosql .mapping .Database ;
11+ import org .eclipse .jnosql .mapping .DatabaseType ;
912
1013import java .util .function .Supplier ;
1114
1215@ ApplicationScoped
1316@ Alternative
1417@ Priority (Interceptor .Priority .APPLICATION )
15- public class ManagerSupplier implements Supplier <MongoDBDocumentManager > {
18+ public class ManagerSupplier implements Supplier <DatabaseManager > {
1619
1720 @ Produces
18- public MongoDBDocumentManager get () {
21+ @ Database (DatabaseType .DOCUMENT )
22+ @ Default
23+ public DatabaseManager get () {
1924 return DocumentDatabase .INSTANCE .get ("database" );
2025 }
2126}
You can’t perform that action at this time.
0 commit comments