I had been trying to figure out why my @RestController didn't work in my local machine. Why I could not access it. I found out that if I have xsuaa enabled and file default-env.json (where xsuaa is configured), I can not access my @restcontroller path.
It seems that it bind the service. Here is the log:
2021-05-01 19:21:50.411 INFO 8267 --- [ main] c.s.c.f.s.c.auth.XsuaaPropertiesFactory : Using service binding 'demo-uaa-resource' to configure 'xsuaa' properties section
The app is not asking me for user and password at all. So mocking user, as here described won't help: https://cap.cloud.sap/docs/java/security#mock-users
Only if I remove xsuaa configuration from VCAP_SERVICES (default-env.json), the app will ask for user and password.
Removing the xsuaa configuration will prevent my app to bind the xsuaa service.
Here is the log:
2021-05-01 19:44:10.222 INFO 9637 --- [ main] c.s.c.f.s.c.auth.XsuaaPropertiesFactory : No service binding with tag 'xsuaa' found
Is this normal behaviour? How I can I access restcontroller path without removing xsuaa or default-env.json and also without user and password at all?