对于我的Spring MVC项目,我试图将Thymeleaf列表对象从模型传递给Javascript,但是,我在控制台上收到以下错误:
ERROR: org.thymeleaf.TemplateEngine - [THYMELEAF][tomcat-http--12] Exception processing template "eventList": Error during execution of processor 'org.thymeleaf.standard.processor.text.StandardTextInliningTextProcessor'
以下是Javascript代码:
<script th:inline="javascript">
/*<![CDATA[*/
var eventList = [[${eventList}]];
for(var i = 0; i < eventList.length; i++){
console.log(eventList[i]);
}
/*]]>*/
</script>
eventList是List
的{{1}}。这是我的Event
对象:
Event
这是我的import java.util.List;
import org.joda.time.DateTime;
/**
* Model to represent an event
*
*/
// TODO: Add field for list of attachments
public class Event {
private String eventId;
private String title;
private String description;
private int points;
private Location location;
private DateTime startDate;
private DateTime endDate;
private List<User> attendees;
public String getEventId() {
return eventId;
}
public void setEventId(String eventId) {
this.eventId = eventId;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public int getPoints() {
return points;
}
public void setPoints(int points) {
this.points = points;
}
public Location getLocation() {
return location;
}
public void setLocation(Location location) {
this.location = location;
}
public DateTime getStartDate() {
return startDate;
}
public void setStartDate(DateTime startDate) {
this.startDate = startDate;
}
public DateTime getEndDate() {
return endDate;
}
public void setEndDate(DateTime endDate) {
this.endDate = endDate;
}
public List<User> getAttendees() {
return attendees;
}
public void setAttendees(List<User> attendees) {
this.attendees = attendees;
}
}
对象:
User
这是我的import java.util.Map;
/**
* Model that represents a user
*
*/
public class User {
private String username;
private String password;
private String email;
private Map<Event, Boolean> eventList;
private Integer points;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public Map<Event, Boolean> getEventList() {
return eventList;
}
public void setEventList(Map<Event, Boolean> eventList) {
this.eventList = eventList;
}
public Integer getPoints() {
return points;
}
public void setPoints(Integer points) {
this.points = points;
}
}
对象:
Location
这是我的/**
* Model to represent a location
*
*/
public class Location {
private String name;
private String address;
private String roomNumber;
private double latitude;
private double longitude;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getRoomNumber() {
return roomNumber;
}
public void setRoomNumber(String roomNumber) {
this.roomNumber = roomNumber;
}
public double getLatitude() {
return latitude;
}
public void setLatitude(double latitude) {
this.latitude = latitude;
}
public double getLongitude() {
return longitude;
}
public void setLongitude(double longitude) {
this.longitude = longitude;
}
}
文件:
WebConfig.java
以下是收到的所有例外情况:
/**
* Default web configurer
*/
@Configuration
@EnableWebMvc
@ComponentScan({ "edu.ilstu.business.era.configurations", "edu.ilstu.business.era.controllers",
"edu.ilstu.business.era.repositories", "edu.ilstu.business.era.mappers", "edu.ilstu.business.era.utilities" })
public class WebConfig extends WebMvcConfigurerAdapter {
/**
* Folder with views
*/
private static final String TEMPLATE_RESOLVER_PREFIX = "/WEB-INF/views/prod/";
/**
* View extension
*/
private static final String TEMPLATE_RESOLVER_SUFFIX = ".html";
/**
* View type
*/
private static final String TEMPLATE_RESOLVER_TEMPLATE_MODE = "HTML5";
/**
* Configure view resolver bean
*
* @return
*/
@Bean
public ViewResolver viewResolver() {
ThymeleafViewResolver viewResolver = new ThymeleafViewResolver();
viewResolver.setTemplateEngine(templateEngine());
return viewResolver;
}
/**
* Configure the template engine
*
* @return
*/
@Bean
public SpringTemplateEngine templateEngine() {
SpringTemplateEngine templateEngine = new SpringTemplateEngine();
templateEngine.setTemplateResolver(templateResolver());
return templateEngine;
}
/**
* Configure the template resolver
*
* @return
*/
@Bean
public TemplateResolver templateResolver() {
TemplateResolver templateResolver = new ServletContextTemplateResolver();
templateResolver.setPrefix(TEMPLATE_RESOLVER_PREFIX);
templateResolver.setSuffix(TEMPLATE_RESOLVER_SUFFIX);
templateResolver.setTemplateMode(TEMPLATE_RESOLVER_TEMPLATE_MODE);
return templateResolver;
}
/**
* Configure the property source
*
* @return
*/
@Bean
public static PropertySourcesPlaceholderConfigurer propertyConfigInDev() {
return new PropertySourcesPlaceholderConfigurer();
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**").addResourceLocations("/resources/static/assets/");
}
}
我尝试删除org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateProcessingException: Error during execution of processor 'org.thymeleaf.standard.processor.text.StandardTextInliningTextProcessor'
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:973)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:112)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:158)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:206)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:121)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:100)
root cause
org.thymeleaf.exceptions.TemplateProcessingException: Error during execution of processor 'org.thymeleaf.standard.processor.text.StandardTextInliningTextProcessor'
org.thymeleaf.processor.AbstractProcessor.process(AbstractProcessor.java:225)
org.thymeleaf.dom.Node.applyNextProcessor(Node.java:1017)
org.thymeleaf.dom.Node.processNode(Node.java:972)
org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:695)
org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:668)
org.thymeleaf.dom.Node.processNode(Node.java:990)
org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:695)
org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:668)
org.thymeleaf.dom.Node.processNode(Node.java:990)
org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:695)
org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:668)
org.thymeleaf.dom.Node.processNode(Node.java:990)
org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:695)
org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:668)
org.thymeleaf.dom.Node.processNode(Node.java:990)
org.thymeleaf.dom.Document.process(Document.java:93)
org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1155)
org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1060)
org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1011)
org.thymeleaf.spring4.view.ThymeleafView.renderFragment(ThymeleafView.java:335)
org.thymeleaf.spring4.view.ThymeleafView.render(ThymeleafView.java:190)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1228)
org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1011)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:955)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:112)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:158)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:206)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:121)
root cause
java.lang.IllegalArgumentException: Could not perform introspection on object of class org.joda.time.tz.DateTimeZoneBuilder$PrecalculatedZone
org.thymeleaf.util.JavaScriptUtils.printObject(JavaScriptUtils.java:368)
org.thymeleaf.util.JavaScriptUtils.print(JavaScriptUtils.java:184)
org.thymeleaf.util.JavaScriptUtils.printKeyValue(JavaScriptUtils.java:347)
org.thymeleaf.util.JavaScriptUtils.printMap(JavaScriptUtils.java:338)
org.thymeleaf.util.JavaScriptUtils.printObject(JavaScriptUtils.java:366)
org.thymeleaf.util.JavaScriptUtils.print(JavaScriptUtils.java:184)
org.thymeleaf.util.JavaScriptUtils.printKeyValue(JavaScriptUtils.java:347)
org.thymeleaf.util.JavaScriptUtils.printMap(JavaScriptUtils.java:338)
org.thymeleaf.util.JavaScriptUtils.printObject(JavaScriptUtils.java:366)
org.thymeleaf.util.JavaScriptUtils.print(JavaScriptUtils.java:184)
org.thymeleaf.util.JavaScriptUtils.printKeyValue(JavaScriptUtils.java:347)
org.thymeleaf.util.JavaScriptUtils.printMap(JavaScriptUtils.java:338)
org.thymeleaf.util.JavaScriptUtils.printObject(JavaScriptUtils.java:366)
org.thymeleaf.util.JavaScriptUtils.print(JavaScriptUtils.java:184)
org.thymeleaf.util.JavaScriptUtils.printKeyValue(JavaScriptUtils.java:347)
org.thymeleaf.util.JavaScriptUtils.printMap(JavaScriptUtils.java:338)
org.thymeleaf.util.JavaScriptUtils.printObject(JavaScriptUtils.java:366)
org.thymeleaf.util.JavaScriptUtils.print(JavaScriptUtils.java:184)
org.thymeleaf.util.JavaScriptUtils.printCollection(JavaScriptUtils.java:323)
org.thymeleaf.util.JavaScriptUtils.print(JavaScriptUtils.java:173)
org.thymeleaf.util.JavaScriptUtils.print(JavaScriptUtils.java:56)
org.thymeleaf.standard.inliner.StandardJavaScriptTextInliner.formatEvaluationResult(StandardJavaScriptTextInliner.java:46)
org.thymeleaf.standard.inliner.AbstractStandardScriptingTextInliner.processScriptingVariableInline(AbstractStandardScriptingTextInliner.java:294)
org.thymeleaf.standard.inliner.AbstractStandardScriptingTextInliner.processScriptingInline(AbstractStandardScriptingTextInliner.java:90)
org.thymeleaf.standard.inliner.AbstractStandardScriptingTextInliner.inline(AbstractStandardScriptingTextInliner.java:76)
org.thymeleaf.standard.processor.text.StandardTextInliningTextProcessor.processTextNode(StandardTextInliningTextProcessor.java:93)
org.thymeleaf.processor.text.AbstractTextNodeProcessor.doProcess(AbstractTextNodeProcessor.java:69)
org.thymeleaf.processor.AbstractProcessor.process(AbstractProcessor.java:212)
org.thymeleaf.dom.Node.applyNextProcessor(Node.java:1017)
org.thymeleaf.dom.Node.processNode(Node.java:972)
org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:695)
org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:668)
org.thymeleaf.dom.Node.processNode(Node.java:990)
org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:695)
org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:668)
org.thymeleaf.dom.Node.processNode(Node.java:990)
org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:695)
org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:668)
org.thymeleaf.dom.Node.processNode(Node.java:990)
org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:695)
org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:668)
org.thymeleaf.dom.Node.processNode(Node.java:990)
org.thymeleaf.dom.Document.process(Document.java:93)
org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1155)
org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1060)
org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1011)
org.thymeleaf.spring4.view.ThymeleafView.renderFragment(ThymeleafView.java:335)
org.thymeleaf.spring4.view.ThymeleafView.render(ThymeleafView.java:190)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1228)
org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1011)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:955)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:112)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:158)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
root cause
java.lang.IllegalAccessException: Class org.thymeleaf.util.JavaScriptUtils can not access a member of class org.joda.time.tz.DateTimeZoneBuilder$PrecalculatedZone with modifiers "public"
sun.reflect.Reflection.ensureMemberAccess(Reflection.java:102)
java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:296)
java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:288)
java.lang.reflect.Method.invoke(Method.java:491)
org.thymeleaf.util.JavaScriptUtils.printObject(JavaScriptUtils.java:361)
org.thymeleaf.util.JavaScriptUtils.print(JavaScriptUtils.java:184)
org.thymeleaf.util.JavaScriptUtils.printKeyValue(JavaScriptUtils.java:347)
org.thymeleaf.util.JavaScriptUtils.printMap(JavaScriptUtils.java:338)
org.thymeleaf.util.JavaScriptUtils.printObject(JavaScriptUtils.java:366)
org.thymeleaf.util.JavaScriptUtils.print(JavaScriptUtils.java:184)
org.thymeleaf.util.JavaScriptUtils.printKeyValue(JavaScriptUtils.java:347)
org.thymeleaf.util.JavaScriptUtils.printMap(JavaScriptUtils.java:338)
org.thymeleaf.util.JavaScriptUtils.printObject(JavaScriptUtils.java:366)
org.thymeleaf.util.JavaScriptUtils.print(JavaScriptUtils.java:184)
org.thymeleaf.util.JavaScriptUtils.printKeyValue(JavaScriptUtils.java:347)
org.thymeleaf.util.JavaScriptUtils.printMap(JavaScriptUtils.java:338)
org.thymeleaf.util.JavaScriptUtils.printObject(JavaScriptUtils.java:366)
org.thymeleaf.util.JavaScriptUtils.print(JavaScriptUtils.java:184)
org.thymeleaf.util.JavaScriptUtils.printKeyValue(JavaScriptUtils.java:347)
org.thymeleaf.util.JavaScriptUtils.printMap(JavaScriptUtils.java:338)
org.thymeleaf.util.JavaScriptUtils.printObject(JavaScriptUtils.java:366)
org.thymeleaf.util.JavaScriptUtils.print(JavaScriptUtils.java:184)
org.thymeleaf.util.JavaScriptUtils.printCollection(JavaScriptUtils.java:323)
org.thymeleaf.util.JavaScriptUtils.print(JavaScriptUtils.java:173)
org.thymeleaf.util.JavaScriptUtils.print(JavaScriptUtils.java:56)
org.thymeleaf.standard.inliner.StandardJavaScriptTextInliner.formatEvaluationResult(StandardJavaScriptTextInliner.java:46)
org.thymeleaf.standard.inliner.AbstractStandardScriptingTextInliner.processScriptingVariableInline(AbstractStandardScriptingTextInliner.java:294)
org.thymeleaf.standard.inliner.AbstractStandardScriptingTextInliner.processScriptingInline(AbstractStandardScriptingTextInliner.java:90)
org.thymeleaf.standard.inliner.AbstractStandardScriptingTextInliner.inline(AbstractStandardScriptingTextInliner.java:76)
org.thymeleaf.standard.processor.text.StandardTextInliningTextProcessor.processTextNode(StandardTextInliningTextProcessor.java:93)
org.thymeleaf.processor.text.AbstractTextNodeProcessor.doProcess(AbstractTextNodeProcessor.java:69)
org.thymeleaf.processor.AbstractProcessor.process(AbstractProcessor.java:212)
org.thymeleaf.dom.Node.applyNextProcessor(Node.java:1017)
org.thymeleaf.dom.Node.processNode(Node.java:972)
org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:695)
org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:668)
org.thymeleaf.dom.Node.processNode(Node.java:990)
org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:695)
org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:668)
org.thymeleaf.dom.Node.processNode(Node.java:990)
org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:695)
org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:668)
org.thymeleaf.dom.Node.processNode(Node.java:990)
org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:695)
org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:668)
org.thymeleaf.dom.Node.processNode(Node.java:990)
org.thymeleaf.dom.Document.process(Document.java:93)
org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1155)
org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1060)
org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1011)
org.thymeleaf.spring4.view.ThymeleafView.renderFragment(ThymeleafView.java:335)
org.thymeleaf.spring4.view.ThymeleafView.render(ThymeleafView.java:190)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1228)
org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1011)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:955)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:112)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:158)
对象中的Location
和List<User>
字段,但错误仍然存在。我还尝试将Event
更改为DateTime
以及Date
(假设转换String
时出错)但错误仍然存在(但可能已经完成)不正确地)。
答案 0 :(得分:0)
也许这不是一个解决方案,但它对我有用。尝试用小写字母键入所有变量。似乎Thymeleaf对于在其中间具有大写字母的变量不能正常工作。与roomNumber
eventList
一样。