stormpath / stormpath-sdk-java

Official Java SDK for the Stormpath User Management REST API
222 stars 155 forks source link

Stormpath Spring Boot Auto Configuration Controller Endpoint Conflicts #1164

Open andersonkyle opened 7 years ago

andersonkyle commented 7 years ago

Stormpath Spring Boot Auto Configuration should be more mindful of User Configuration, specifically Controller Mappings (e.g. @RequestMapping).

If Stormpath attempts to register a mapping that already exists in User Configuration, the application should fail at startup to remain consistent with Spring Boot behavior regarding conflicting Controller Endpoints.

The current behavior is the Stormpath endpoint silently overrides the one defined by the User. This was discovered while researching #1160

andersonkyle commented 7 years ago

I've created a fix for this in PR #1165

I'm still not in love with the way that Stormpath creates mappings. Spring isn't aware of these mappings, so they don't show up in the Actuator endpoints, logs, etc. If I'm leveraging the Spring Framework, I want my Application Context to be aware of everything. Had this been the case the above fix would've been unnecessary.

That may require more refactoring so I'd like to get your thoughts on it. But in the meantime I think the PR mentioned above is a reasonable interim fix.