메신저 사용하여 조각을 포장 한 후 조각을 해결하지 :봄 부팅 : Thymeleaf는 다음과 같이
@RequestMapping(value="/fragment/nodeListWithStatus", method= RequestMethod.GET)
public String nodeListWithStatus(Model model) {
// status der nodes
model.addAttribute("nodeList", nodeService.getNodeListWithOnlineStatus());
return "/fragments :: nodeList";
}
템플릿은 /의 SRC/메인/자원/템플릿에 있습니다. IntelliJ에서 응용 프로그램을 시작할 때이 작동합니다. .jar 파일을 만들고 시작하면 위의 코드는 더 이상 작동하지 않습니다. 오류 :
[2014-10-21 20:37:09.191] log4j - 7941 ERROR [http-nio-666-exec-2] --- TemplateEngine: [THYMELEAF][http-nio-666-exec-2] Exception processing template "/fragments": Error resolving template "/fragments", template might not exist or might not be accessible by any of the configured Template Resolvers
winrar로 .jar를 열면 /templates/fragments.html이 표시됩니다. 여기에 잘못 뭘 메신저
가 가<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>de.filth.Application</mainClass>
<layout>JAR</layout>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
가
사람이 말해 줄 수 :
내 pom.xml 파일이 (Maven을 클린 설치) 단지를 구축하기위한 부분이?
감사합니다.
앤디에게 설명을 주신 데 대해 감사드립니다. 문제가 해결되었습니다. 프레임 워크에서 이것이 어떻게 든 더 깊게 해결 될 수 있는지 살펴 봅니다. –