• 카테고리

    질문 & 답변
  • 세부 분야

    백엔드

  • 해결 여부

    미해결

localhost:18080/hello시 404 에러

19.09.05 23:43 작성 조회수 313

0

management.endpoints.web.exposure.include=*

spring.boot.admin.client.url=http://localhost:8080

server.port=18080

클라이언트 properties에 다음과같이 설정하고 

localhost:18080/hello로 접근하면 

Whitelabel Error Page

404에러가 뜨는데 뭐가 잘못된걸까요..? 

아래는 client에서의 java소스입니다.

package me.izac.springbootactuatordemo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;

@SpringBootApplication
public class Application {

@GetMapping("/hello")
public String hello() {
return "hello";
}

public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}

}

답변 1

답변을 작성해보세요.

0

잘 생각해 보세요. 스프링 MVC에 대한 기초가 부족하신 건지.. 실수하신건지 잘 모르겠네요.