질문있습니다!!!
public String hello(Model model) {
model.addAttribute("date","hello!!");
return "hello";
}
return 값이 templates의 hello.html에 지정이되지않습니다.
return 값이 templates패키지안의 hello.html 지정이 되지않습니다.
윈도우에서 Ctrl + 클릭해도 강사님처럼 html 파일로 따라가지지 않습니다.
이유가 뭘까요? 다른부분있나 인강 몇번 돌려서 다시 작행했는데도 동일합니다.
http://localhost:8080/hello 들어가면 해당오류가 노출됩니다.
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Answer 1
0
안녕하세요. 유영상님, 공식 서포터즈 David입니다.
1. 페이지 요청의 경우 아래와 같이 @GetMapping("hello")을 추가하셨나요? 그런데도 오류가 발생한다면 intellij 로그에 찍힌 에러를 글에 첨부해주세요.
2. return "템플릿명"을 눌렀을 때 이동하는 기능은 intellij 유료버전 기능입니다.
감사합니다.
0
넵 @GetMapping 추가되어있습니다.
2022-04-20 10:56:20.276 ERROR 28996 --- [nio-8080-exec-4] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateProcessingException: Could not parse as expression: "'�ȳ��ϼ���. ' + $(date)" (template: "hello" - line 8, col 4)] with root cause
에러는 이렇게 나왔습니다.
근데 조금다른데
@Controller
public class HelloController 요기에서 HelloController 이 회색입니다.
..
0
87
2
Unused property.....
0
105
2
project JDK is misconfigured
0
142
2
외부 API의 ID 타입(String/UUID)과 내부 도메인의 ID 타입(Long)이 불일치할 때의 설계 정석
0
86
2
단위/통합 테스트 버전충돌 문제
0
92
2
❗️springboot 4.0.2 버전 aspectj dependency 설정❗️
0
238
1
왜 컨트롤러는 변한게 없는데 새로 만든 html 파일이 뜨나요?
0
106
2
윈도우 build test오류 질문
1
105
2
테스트 관련 공부에 대한 조언을 얻고 싶습니다
0
103
2
테스트 실행 시 에러 질문
0
301
1
name을 통한 비교와 객체를 통한 비교
0
77
1
빌드 후 libs 없음
1
134
1
윈도우 gradlew.bat 에러
0
171
1
@PostMapping("/members/new")가 동작하지 않습니다
0
91
1
java static class와 kotlin class
0
83
1
스프링 DB연결
0
129
1
소요 시간
0
89
2
ddl.sql에 빨간 밑줄
1
102
2
welcome page 에러
0
187
3
잘 모르겠습니다.
0
166
2
fail을 똑같이 쳤는데 오류가 발생해요
0
161
2
index.html Welcome page
0
128
1
프로젝트 gradle-groovy ?
0
385
1
테스트코드 메서드명 한글
0
207
2

