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 3
3
import jakarta .annotation .Priority ;
4
4
import jakarta .enterprise .context .ApplicationScoped ;
5
5
import jakarta .enterprise .inject .Alternative ;
6
+ import jakarta .enterprise .inject .Default ;
6
7
import jakarta .enterprise .inject .Produces ;
7
8
import 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 ;
9
12
10
13
import java .util .function .Supplier ;
11
14
12
15
@ ApplicationScoped
13
16
@ Alternative
14
17
@ Priority (Interceptor .Priority .APPLICATION )
15
- public class ManagerSupplier implements Supplier <MongoDBDocumentManager > {
18
+ public class ManagerSupplier implements Supplier <DatabaseManager > {
16
19
17
20
@ Produces
18
- public MongoDBDocumentManager get () {
21
+ @ Database (DatabaseType .DOCUMENT )
22
+ @ Default
23
+ public DatabaseManager get () {
19
24
return DocumentDatabase .INSTANCE .get ("database" );
20
25
}
21
26
}
You can’t perform that action at this time.
0 commit comments