강의

멘토링

커뮤니티

Cộng đồng Hỏi & Đáp của Inflearn

Hình ảnh hồ sơ của gustj9337
gustj9337

câu hỏi đã được viết

Spring MVC Phần 1 - Công nghệ cốt lõi phát triển web backend

Hello Servlet

localhost:8080/hello시 whitelabel error 발생

Viết

·

730

0

localhost:8080/hello 로 접속할시 whitelabel error 발생합니다!

@ServletComponentScan 붙이고

war인것도 확인했지만

콘솔에도 찍히지 않는 상황입니다!

어떤곳이 문제인지 잘 모르겠습니다ㅠㅠ

현재 helloServlet과 ServletApplication의 상태입니다!

package hello.servlet.basic;

import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;

@WebServlet(name = "helloServlet", urlPatterns = "/hello")
public class HelloServlet extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("HelloServlet.service");
    }
}
package hello.servlet;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;

@ServletComponentScan //서블릿 자동 등록
@SpringBootApplication
public class ServletApplication {

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

}

현재 폴더 구조입니다!

MVCspring

Câu trả lời 2

0

ParkHyunSeo님의 프로필 이미지
ParkHyunSeo
Người đặt câu hỏi

sdk를 17로 쓰고있었는데 correto-11로 변경하니깐 해결되었습니다!

0

안녕하세요. ParkHyunSeo님, 공식 서포터즈 OMG입니다.
다음 링크의 제 답변에서 제공하는 프로젝트를 다운받아 확인해보시겠어요?

동일한 증상이 발생할 경우 댓글 남겨주세요.

감사합니다.

ParkHyunSeo님의 프로필 이미지
ParkHyunSeo
Người đặt câu hỏi

프로젝트를 다운받아도 똑같은 증상이 발생합니다ㅠㅠ

 

ParkHyunSeo님의 프로필 이미지
ParkHyunSeo
Người đặt câu hỏi

https://www.inflearn.com/questions/801797/localhost-8080-hello-white-label 저도 이분과 동일한 현상으로 보여집니다!

Hình ảnh hồ sơ của gustj9337
gustj9337

câu hỏi đã được viết

Đặt câu hỏi