I have three URL's, all of them are GET request
- xyz.com/organization/{id}
- xyz.com/organization/optionalQueryParam1=?&optionalQueryParam2=
- xyz.com/organization/{differentId}/locations
I want to add different authentication for all the URL's in spring boot web Security config file. They are all mapped in one controller i.e. organization controller.Could you please suggest what I can do here.
Current code impl :
BASE_URL = "/organization"
.mvcMatchers(
HttpMethod.GET,
OrganizationController.BASE_URL,
OrganizationController.BASE_URL + "/*/locations",
OrganizationController.BASE_URL + "/**"
).authenticated()
so it authenticates all of them. I don't want authentication for xyz.com/organization/{id} get request.
Could you please help with this, thanks in advance.
question from:
https://stackoverflow.com/questions/65940226/web-config-spring-boot-mapping 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…