File tree Expand file tree Collapse file tree
main/java/io/mosip/kernel/websub/api
test/java/io/mosip/kernel/websub/api/test/subscriber Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,8 +70,8 @@ public class SubscriberClientImpl
7070 @ Autowired
7171 private RestTemplateHelper restTemplateHelper ;
7272
73- @ Autowired
74- private ObjectMapper objectMapper ;
73+ /** Local mapper so this library does not register/steal the application {@link ObjectMapper}. */
74+ private final ObjectMapper objectMapper = new ObjectMapper () ;
7575
7676 /**
7777 * When {@code true}, callback URLs include {@code intentMode} for hub verification
Original file line number Diff line number Diff line change 33import jakarta .servlet .Filter ;
44
55import org .springframework .beans .factory .annotation .Autowired ;
6- import org .springframework .boot .autoconfigure .condition .ConditionalOnMissingBean ;
76import org .springframework .boot .web .servlet .FilterRegistrationBean ;
87import org .springframework .context .annotation .Bean ;
98import org .springframework .context .annotation .Configuration ;
109import org .springframework .context .annotation .EnableAspectJAutoProxy ;
1110
12- import com .fasterxml .jackson .databind .ObjectMapper ;
13-
1411import io .mosip .kernel .core .websub .spi .SubscriptionClient ;
1512import io .mosip .kernel .core .websub .spi .SubscriptionExtendedClient ;
1613import io .mosip .kernel .websub .api .aspects .WebSubClientAspect ;
3532@ EnableAspectJAutoProxy
3633public class WebSubClientConfig {
3734
38- /**
39- * Jackson mapper for failed-content JSON when no application {@link ObjectMapper} exists.
40- *
41- * @return new {@link ObjectMapper}
42- */
43- @ Bean
44- @ ConditionalOnMissingBean (ObjectMapper .class )
45- public ObjectMapper objectMapper () {
46- return new ObjectMapper ();
47- }
48-
4935 /**
5036 * Hub intent-verification helper (topic / mode match).
5137 *
Original file line number Diff line number Diff line change @@ -66,8 +66,7 @@ public class SubscriberClientApiTest {
6666
6767 private String expectedFailedContentURL = "http://localhost:9191/hub?topic=demo&callback=aHR0cDovL2xvY2FsaG9zdDo4MDgwL2NhbGxiYWNr×tamp=2021-08-30T12:39:23.511446100Z&pageindex=0&messageCount=10" ;
6868
69- @ Autowired
70- private ObjectMapper objectMapper ;
69+ private final ObjectMapper objectMapper = new ObjectMapper ();
7170
7271 @ Before
7372 public void init () {
You can’t perform that action at this time.
0 commit comments