0
Ich habe ein Problem mit der korrekten Konfiguration templateResolver. Wenn ich versuche, eine Standardseite zu bekommen, funktioniert es gut. Wenn ich versuche, auf die Seite mit/Someaddress iSpring templateResolver konfigurieren
template might not exist or might not be accessible by any of the configured Template Resolvers
Dispatcher-servlet.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd">
<mvc:annotation-driven/>
<context:component-scan base-package="com.javapointers.controllers"/>
<bean id="templateResolver"
class="org.thymeleaf.templateresolver.ServletContextTemplateResolver">
<property name="prefix" value="/WEB-INF/pages/"/>
<property name="suffix" value=".html"/>
<property name="templateMode" value="HTML5"/>
</bean>
<bean id="templateEngine" class="org.thymeleaf.spring4.SpringTemplateEngine">
<property name="templateResolver" ref="templateResolver"/>
</bean>
<mvc:resources mapping="/resources/**" location="/WEB-INF/resources/"/>
Homecontroller
@Controller
public class HomeController {
@RequestMapping(value="/", method = RequestMethod.GET)
public String viewHome(){
return "test";
}
@RequestMapping(value="/login", method = RequestMethod.GET)
public String login(){
return "login";
}
bekommen
Kennt jemand die richtige konfigurieren?