I want to find out what is the best way to update a spring boot application in production without affecting clients that calls these microservices?
The spring boot application uses Consul for service registration. So, stopping the spring boot app, would take down the service and clients would not be able to call this service until it starts up again and registers itself with Consul.
Is this just the way it is supposed to work, or is there a workaround …
我有一个使用oauth2进行身份验证的spring启动应用程序.oauth2机制正在运行,客户端可以验证并接收其访问令牌.
我想用httpbasic身份验证来保护执行器端点,即不要求用户首先使用oauth2进行身份验证,然后访问执行器端点.到目前为止我所做的是在属性文件中设置以下内容:
management.context-path=/admin/actuators
management.security.enabled=true
management.security.role=ADMIN
security.user.name=admin
security.user.password=password
Run Code Online (Sandbox Code Playgroud)
我已经尝试了各种方法来使用ResourceServerConfigurerAdapter和WebSecurityConfigurerAdapter设置配置.
我的尝试都没有奏效,它一直在告诉我
<oauth>
<error_description>
Full authentication is required to access this resource
</error_description>
<error>unauthorized</error>
</oauth>
Run Code Online (Sandbox Code Playgroud)
让OAUTH2和管理端点工作的正确方法是什么?