第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

在Docker中使用Spring Boot Actuator?

在Docker中使用Spring Boot Actuator?

寶慕林4294392 2021-04-06 17:14:28
我有一個帶有自定義Spring Boot Acturators的Spring Boot微服務(wù)。當(dāng)我直接運行Jar時,我可以訪問所有的執(zhí)行器,而當(dāng)我在Docker-Image中運行相同的Jar時,會出現(xiàn)404錯誤。SecurityConfig:@Configurationpublic class ActuatorSecurityConfiguration extends WebSecurityConfigurerAdapter {    @Override    protected void configure(HttpSecurity http) throws Exception {        http                .requestMatcher(EndpointRequest.toAnyEndpoint())                .anonymous()                //.authorizeRequests()                //.anyRequest().authenticated()                .and()                .httpBasic();    }}Application.yaml:spring:    profiles: actuatormanagement.endpoints:    web.exposure.include: "*"    health.show-details: always這就像我的執(zhí)行器的“樣板代碼”:@Component@RestControllerEndpoint(id = "acturatorName")public class acturatorNameActurator {    @GetMapping(value = "/foo", produces = "application/json")    public String bar(){        return "{\"status\":\"started\"}";    }    ...}當(dāng)我僅運行Jar內(nèi)部運行docker時,我的自定義執(zhí)行器都無法工作嗎?/actuator/info例如工作,但/actuator/metrics不。我該怎么做才能解決此問題?進階輸入
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 268 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號