Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
是什么原因引起的;对SpringEL表达式求值时出现异常:“0”;在百里香?_Spring_Exception_Thymeleaf - Fatal编程技术网

是什么原因引起的;对SpringEL表达式求值时出现异常:“0”;在百里香?

是什么原因引起的;对SpringEL表达式求值时出现异常:“0”;在百里香?,spring,exception,thymeleaf,Spring,Exception,Thymeleaf,错误指向这一行: Caused by: org.attoparser.ParseException: Exception evaluating SpringEL expression: "#numbers.sequence( pageNumber + 1, patientsPage.totalPages > 10 + pageNumber ? pageNumber + 10 : patientsPage.totalPages, 1)" 这个表达式怎么了?这不是正确的计算方法吗 这是我的密

错误指向这一行:

Caused by: org.attoparser.ParseException: Exception evaluating SpringEL expression: "#numbers.sequence( pageNumber + 1, patientsPage.totalPages > 10 + pageNumber ? pageNumber + 10 : patientsPage.totalPages, 1)"
这个表达式怎么了?这不是正确的计算方法吗

这是我的密码:

    <li class="page-item"
    th:classappend="${i eq pageNumber + 1} ? 'active'"
    th:each="i : ${#numbers.sequence( pageNumber + 1, patientsPage.totalPages > 10 + pageNumber ? pageNumber + 10 : patientsPage.totalPages, 1)}">
    <a class="page-link" th:text="${i}"
    th:title="${'Page '+ i}" rel="tooltip"></a>
    </li>
  • 堆栈跟踪:

    2020-03-24 14:06:35.440错误43588---[nio-8081-exec-3]org.thymeleaf.TemplateEngine:[thymeleaf][http-nio-8081-exec-3]异常处理模板“exames”:模板解析过程中发生错误(模板:“类路径资源[templates/exames.html]”)

    org.thymeleaf.exceptions.TemplateInputException:模板解析期间发生错误(模板:“类路径资源[templates/examples.html]”) 在org.thymeleaf.templateparser.markup.AbstractMarkupTemplateParser.parse(AbstractMarkupTemplateParser.java:241)~[thymeleaf-3.0.9.RELEASE.jar:3.0.9.RELEASE] 在org.thymeleaf.templateparser.markup.AbstractMarkupTemplateParser.parseStandalone(AbstractMarkupTemplateParser.java:100)~[thymeleaf-3.0.9.RELEASE.jar:3.0.9.RELEASE] 在org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:666)~[thymeleaf-3.0.9.RELEASE.jar:3.0.9.RELEASE] 在org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1098)[thymeleaf-3.0.9.RELEASE.jar:3.0.9.RELEASE] 在org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1072)[thymeleaf-3.0.9.RELEASE.jar:3.0.9.RELEASE] 在org.thymeleaf.spring5.view.ThymeleafView.renderFragment(ThymeleafView.java:354)[thymeleaf-spring5-3.0.9.RELEASE.jar:3.0.9.RELEASE] 在org.thymeleaf.spring5.view.ThymeleafView.render(ThymeleafView.java:187)[thymeleaf-spring5-3.0.9.RELEASE.jar:3.0.9.RELEASE] 位于org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1325)[spring-webmvc-5.0.9.RELEASE.jar:5.0.9.RELEASE] 在org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1069)[spring-webmvc-5.0.9.RELEASE.jar:5.0.9.RELEASE] 在org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1008)[spring-webmvc-5.0.9.RELEASE.jar:5.0.9.RELEASE] 位于org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)[spring-webmvc-5.0.9.RELEASE.jar:5.0.9.RELEASE] 位于org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)[spring-webmvc-5.0.9.RELEASE.jar:5.0.9.RELEASE] 位于org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:866)[spring-webmvc-5.0.9.RELEASE.jar:5.0.9.RELEASE] 在javax.servlet.http.HttpServlet.service(HttpServlet.java:635)[tomcat-embed-core-8.5.34.jar:8.5.34] 在org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)[spring-webmvc-5.0.9.RELEASE.jar:5.0.9.RELEASE] 位于javax.servlet.http.HttpServlet.service(HttpServlet.java:742)[tomcat-embed-core-8.5.34.jar:8.5.34] 在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)[tomcat-embed-core-8.5.34.jar:8.5.34] 在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)[tomcat-embed-core-8.5.34.jar:8.5.34] 在org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)[tomcat-embed-websocket-8.5.34.jar:8.5.34] 在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)[tomcat-embed-core-8.5.34.jar:8.5.34] 在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)[tomcat-embed-core-8.5.34.jar:8.5.34] 在org.springframework.security.web.FilterChainProxy$virtualfilterchainproxy.doFilter(FilterChainProxy.java:320)[spring-security-web-5.0.8.RELEASE.jar:5.0.8.RELEASE] 在org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)[spring-security-web-5.0.8.RELEASE.jar:5.0.8.RELEASE] 在org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)[spring-security-web-5.0.8.RELEASE.jar:5.0.8.RELEASE] 在org.springframework.security.web.FilterChainProxy$virtualfilterchainproxy.doFilter(FilterChainProxy.java:334)[spring-security-web-5.0.8.RELEASE.jar:5.0.8.RELEASE] 在org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)[spring-security-web-5.0.8.RELEASE.jar:5.0.8.RELEASE] 在org.springframework.security.web.FilterChainProxy$virtualfilterchainproxy.doFilter(FilterChainProxy.java:334)[spring-security-web-5.0.8.RELEASE.jar:5.0.8.RELEASE] 在org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)[spring-security-web-5.0.8.RELEASE.jar:5.0.8.RELEASE] 在org.springframework.security.web.FilterChainProxy$virtualfilterchainproxy.doFilter(FilterChainProxy.java:334)[spring-security-web-5.0.8.RELEASE.jar:5.0.8.RELEASE] 在org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)[spring-security-web-5.0.8.RELEASE.jar:5.0.8.RELEASE] 在org.springframework.security.web.FilterChainProxy$virtualfilterchainproxy.doFilter(FilterChainProxy.java:334)[spring-security-web-5.0.8.RELEASE.jar:5.0.8.RELEASE] 位于org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)[spring-security-web-5.0.8.RELEASE.jar:5.0.8.RELEASE] 在org.springframework.security.web.FilterChainProxy$virtualfilterchainproxy.doFilter(FilterChainProxy.java:334)[spring-security-web-5.0.8.RELEASE.jar:5.0.8.RELEASE] 位于org.springframework.security.web.savedrequest.RequestCacheAwarRefilter.doFilter(RequestCacheAwarRefilter.java:63)[spring]-
    th:each="i : ${#numbers.sequence(pageNumber + 1, patientsPage.totalPages gt 10 + pageNumber ? pageNumber + 10 : patientsPage.totalPages, 1)}">
    
    th:each="i : ${#numbers.sequence(pageNumber + 1, patientsPage.totalPages &gt; 10 + pageNumber ? pageNumber + 10 : patientsPage.totalPages, 1)}">