stormpath-sdk-java icon indicating copy to clipboard operation
stormpath-sdk-java copied to clipboard

Stormpath Spring Boot Auto Configuration Controller Endpoint Conflicts

Open andersonkyle opened this issue 8 years ago • 1 comments

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 avatar Dec 08 '16 21:12 andersonkyle

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.

andersonkyle avatar Dec 09 '16 22:12 andersonkyle