-
Notifications
You must be signed in to change notification settings - Fork 5
2.4 Config AutoRefresh
Fanyuepan edited this page Mar 4, 2019
·
6 revisions
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
management:
endpoints:
web:
exposure:
include: '*'
分别开启服务端和客户端,访问客户端 http://localhost:8081/api/profile
current profile:update before
current:
profile: '{cipher}c7b4ba3110b228ffe3f1b477504be3a8c24cb44c1a5a9b942c79148084efefed'
profile1: update after
["current.profile1","config.client.version"]
current profile:update after
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bus-amqp</artifactId>
</dependency>
management:
endpoints:
web:
exposure:
include: '*'
spring:
rabbitmq:
host: 127.0.0.1
port: 5672
username: panzi
password: 123456
virtual-host: fly
current profile:default
current profile:default-v1
curl -X POST http://panzi:123456@localhost:8000/actuator/bus-refresh
@EnableWebSecurity
@Configuration
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.csrf().disable();
http.authorizeRequests().anyRequest().authenticated().and().httpBasic();
}
}