2016-06-26 3 views
0

intellij 14와 함께 Spring MVC에서 thymeleaf 템플릿 엔진을 사용하려고하지만 코드 완성이 작동하지 않습니다. 도와주세요.임시 코드 완료가 작동하지 않습니다. intellij 14

<!DOCTYPE html> 
<html lang="en" xmlns:th="http://www.thymeleaf.org"> 
<head> 
    <title>Spring Core Online Tutorial</title> 
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 

    <link href="http://cdn.jsdelivr.net/webjars/bootstrap/3.3.4/css/bootstrap.min.css" 
      th:href="@{/webjars/bootstrap/3.3.5/css/bootstrap.min.css}" 
      rel="stylesheet" media="screen" /> 

    <script src="http://cdn.jsdelivr.net/webjars/jquery/2.1.4/jquery.min.js" 
      th:src="@{/webjars/jquery/2.1.4/jquery.min.js}"></script> 

    <link href="../static/css/spring-core.css" 
      th:href="@{css/spring-core.css}" rel="stylesheet" media="screen"/> 
</head> 
<body> 
<div class="container"> 
    <h1>Hello World</h1> 

    <h2>This is my Thymeleaf index page. This is my changed.</h2> 

</div> 

</body> 
</html> 

답변

1

는 누락 된 부분은 여기에 당신이 인 IntelliJ 완료를 얻을 것이다 템플릿이 네임 스페이스의 사용

<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd"> 

<html xmlns="http://www.w3.org/1999/xhtml" 
     xmlns:th="http://www.thymeleaf.org"> 

사용하는 것입니다 intellj 아이디어 (14)에서 thymleaf에 대한 완벽한 지원이 있습니다. 희망이 답변 귀하의 질문. 감사합니다

+1

내 프로젝트에서 완료가 작동하지 않는 이유를 깨닫는 데 1 일이 걸렸습니다. 네임 스페이스 이름의 철자가 잘못되었습니다 ('''''''을 놓쳤습니다). 감사 – Yaro