Closed 39otrebla closed 3 months ago
Apologies, I found out just now that Jakarta Application was registered as CondtionalOnMissingBean
.
For anyone having the same question, it is as simple as overriding the default @Bean
for the Jakarta Application, using @ApplicationPath("/prefix")
:
// ScimServerApplication.java
@ApplicationPath("/scim")
public class ScimServerApplication extends Application {
@Override
public Set<Class<?>> getClasses() {
return ScimResourceHelper.scimpleFeatureAndResourceClasses();
}
}
And then:
// MyApplication.java
@Bean
ServerConfiguration serverConfiguration() {
return new ServerConfiguration()
.setId("contoso.com")
// all other configs
.setBulkMaxOperations(50);
}
@Bean
Application scimApplication() {
return new ScimServerApplication();
}
I confirm that both issues in the OP are solved. It may be worth mentioning in the doc.
These simple additions indeed fixed the problem for my project too, would be worthwhile adding it to the docs because anyone trying to integrate this library in any non-trivial service will have the same problem
Great points!
Does anyone want to take a quick pass at updating the README?
I've successfully integrated this library in Spring Boot 3.2.4, and it works like a charm (so thank you).
However, our SpringBoot application has to serve other HTTP endpoints besides SCIM ones, and we are having mainly two issues:
we implemented a test
@RestController
with a simple@GetMapping("/test-endpoint")
, but calling this endpoint ends up invoking the SCIM server (which in turn does not find this path mapping and returns404
).it seems there's no way to configure a prefix for all SCIM endpoints (e.g.
/SCIM/**
. This makes it impossible to configure multipleSecurityFilter(s)
based on the path prefix, which is required if the same SpringBoot application serves other resources