File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
commons/src/main/java/io/vanillabp/cockpit/commons/mongo/updateinfo Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11package io .vanillabp .cockpit .commons .mongo .updateinfo ;
22
3+ import com .mongodb .reactivestreams .client .MongoClient ;
34import io .vanillabp .cockpit .commons .security .usercontext .reactive .ReactiveUserContext ;
45import java .time .OffsetDateTime ;
56import org .reactivestreams .Publisher ;
67import org .springframework .beans .factory .annotation .Autowired ;
7- import org .springframework .boot .autoconfigure .condition .ConditionalOnProperty ;
8+ import org .springframework .boot .autoconfigure .condition .ConditionalOnClass ;
89import org .springframework .core .Ordered ;
910import org .springframework .core .annotation .Order ;
11+ import org .springframework .data .mongodb .core .ReactiveMongoTemplate ;
1012import org .springframework .data .mongodb .core .mapping .event .ReactiveBeforeConvertCallback ;
1113import org .springframework .stereotype .Component ;
1214import reactor .core .publisher .Mono ;
1315
1416@ Order (Ordered .HIGHEST_PRECEDENCE )
1517@ Component
16- @ ConditionalOnProperty ( prefix = "spring.data.mongodb" , name = "uri" )
18+ @ ConditionalOnClass ({ MongoClient . class , ReactiveMongoTemplate . class } )
1719public class UpdateInformationEventListener implements ReactiveBeforeConvertCallback <Object > {
1820
1921 @ Autowired
@@ -40,5 +42,5 @@ public Publisher<Object> onBeforeConvert(
4042 return Mono .just (entityObj );
4143
4244 }
43-
45+
4446}
You can’t perform that action at this time.
0 commit comments