- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在开发一个 Spring Roo 应用程序,在显示列表中的对象(在 list.jspx 中)时,我获得了引用对象的所有属性。例如:
@RooJavaBean
@RooToString
@RooJpaActiveRecord
public class Employee {
@NotNull
private String empName;
@ManyToOne
private Department department;
}
@RooJavaBean
@RooToString
@RooJpaActiveRecord
public class Department {
@NotNull
private String deptName;
@NotNull
private String deptLocation;
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<div xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:page="urn:jsptagdir:/WEB-INF/tags/form" xmlns:table="urn:jsptagdir:/WEB-INF/tags/form/fields" version="2.0">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<jsp:output omit-xml-declaration="yes"/>
<page:list id="pl_com_test_domain_Employee" items="${employees}" z="user-managed">
<table:table data="${employees}" id="l_com_test_domain_Employee" path="/employees" z="user-managed">
<table:column id="c_com_test_domain_Employee_Department" property="department.deptName" z="user-managed"/>
<table:column id="c_com_test_domain_Employee__DeptLocation" property="deptLocation" z="user-managed"/>
</table:table>
</page:list>
org.springframework.expression.spel.SpelEvaluationException: EL1027E:(pos 4): Indexing into type 'com.test.domain.Employee' is not supported
at org.springframework.expression.spel.ast.Indexer$PropertyIndexingValueRef.getValue(Indexer.java:208)
at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:81)
at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:102)
at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:98)
at org.springframework.web.servlet.tags.EvalTag.doEndTag(EvalTag.java:125)
at org.apache.jsp.tag.webform.fields.table_tagx._jspx_meth_spring_005feval_005f4(table_tagx.java:1390)
at org.apache.jsp.tag.webform.fields.table_tagx._jspx_meth_c_005fset_005f14(table_tagx.java:1357)
at org.apache.jsp.tag.webform.fields.table_tagx._jspx_meth_c_005fotherwise_005f0(table_tagx.java:1324)
at org.apache.jsp.tag.webform.fields.table_tagx._jspx_meth_c_005fchoose_005f0(table_tagx.java:1115)
at org.apache.jsp.tag.webform.fields.table_tagx._jspx_meth_c_005fforTokens_005f1(table_tagx.java:1015)
at org.apache.jsp.tag.webform.fields.table_tagx._jspx_meth_c_005fforEach_005f0(table_tagx.java:949)
at org.apache.jsp.tag.webform.fields.table_tagx._jspx_meth_c_005fif_005f0(table_tagx.java:342)
at org.apache.jsp.tag.webform.fields.table_tagx.doTag(table_tagx.java:269)
at org.apache.jsp.WEB_002dINF.views.autoscalingtasks.list_jspx._jspx_meth_table_005ftable_005f0(list_jspx.java:126)
at org.apache.jsp.WEB_002dINF.views.autoscalingtasks.list_jspx.access$0(list_jspx.java:108)
at org.apache.jsp.WEB_002dINF.views.autoscalingtasks.list_jspx$Helper.invoke0(list_jspx.java:225)
at org.apache.jsp.WEB_002dINF.views.autoscalingtasks.list_jspx$Helper.invoke(list_jspx.java:256)
at org.apache.jsp.tag.webform.list_tagx._jspx_meth_c_005fwhen_005f0(list_tagx.java:444)
at org.apache.jsp.tag.webform.list_tagx._jspx_meth_c_005fchoose_005f0(list_tagx.java:412)
at org.apache.jsp.tag.webform.list_tagx.access$0(list_tagx.java:402)
at org.apache.jsp.tag.webform.list_tagx$Helper.invoke0(list_tagx.java:526)
at org.apache.jsp.tag.webform.list_tagx$Helper.invoke(list_tagx.java:544)
at org.apache.jsp.tag.webutil.panel_tagx._jspx_meth_c_005fif_005f0(panel_tagx.java:193)
at org.apache.jsp.tag.webutil.panel_tagx.doTag(panel_tagx.java:139)
at org.apache.jsp.tag.webform.list_tagx._jspx_meth_util_005fpanel_005f0(list_tagx.java:397)
at org.apache.jsp.tag.webform.list_tagx._jspx_meth_c_005fif_005f0(list_tagx.java:221)
at org.apache.jsp.tag.webform.list_tagx.doTag(list_tagx.java:185)
at org.apache.jsp.WEB_002dINF.views.autoscalingtasks.list_jspx._jspx_meth_page_005flist_005f0(list_jspx.java:103)
at org.apache.jsp.WEB_002dINF.views.autoscalingtasks.list_jspx._jspService(list_jspx.java:72)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:605)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:544)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954)
at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:684)
at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:678)
at org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:103)
at org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:96)
at org.apache.tiles.renderer.impl.TemplateAttributeRenderer.write(TemplateAttributeRenderer.java:44)
at org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:106)
at org.apache.tiles.renderer.impl.ChainedDelegateAttributeRenderer.write(ChainedDelegateAttributeRenderer.java:76)
at org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:106)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:670)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:336)
at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:210)
at org.apache.tiles.template.InsertAttributeModel.end(InsertAttributeModel.java:126)
at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:311)
at org.apache.jsp.WEB_002dINF.layouts.asg_005flist_005fbody_jspx._jspx_meth_tiles_005finsertAttribute_005f2(asg_005flist_005fbody_jspx.java:234)
at org.apache.jsp.WEB_002dINF.layouts.asg_005flist_005fbody_jspx._jspService(asg_005flist_005fbody_jspx.java:96)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
at org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:241)
at org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(ServletTilesRequestContext.java:222)
at org.apache.tiles.renderer.impl.TemplateAttributeRenderer.write(TemplateAttributeRenderer.java:44)
at org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:106)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:670)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:690)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:644)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:627)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:321)
at org.springframework.web.servlet.view.tiles2.TilesView.renderMergedOutputModel(TilesView.java:124)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:264)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1208)
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:992)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:939)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:915)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:811)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:796)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:180)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
最佳答案
我得到了答案,我在这里分享它:
为了避免上述错误,我将 table.tagx 更改如下:
table.tagx: line-84 :
替换这个:
<spring:eval expression="item[column]" htmlEscape="false" />
<spring:eval expression="item.${column}" htmlEscape="false" />
<spring:eval expression="item[typeIdFieldName]"/>
<c:set var="itemId"><spring:eval expression="item.${typeIdFieldName}"/></c:set>
<page:list id="pl_com_test_domain_Employee" items="${employees}" z="user-managed">
<table:table data="${employees}" id="l_com_test_domain_Employee" path="/employees" z="user-managed">
<table:column id="c_com_test_domain_Employee_Department" property="department.deptName" z="user-managed"/>
<table:column id="c_com_test_domain_Employee_DeptLocation" property="deptLocation" z="user-managed"/>
</table:table>
</page:list>
关于spring-mvc - org.springframework.expression.spel.SpelEvaluationException : EL1027E:(pos 4): Indexing into type 'com.test.domain.Employee' is not supported,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18358400/
当我尝试使用 SpEL 将用户传递给服务方法时,我面临下一个问题, evaluate expression="commonService.userTest(user)" result="flowSco
我正在尝试在查询中使用 Spring Security 表达式。如图36. Security Expressions within @Query public interface BookReposi
我正在尝试通过 SpEL 过滤 xml 配置文件中的列表集合 这是我的课 public class PCCollection implements MarketPC { private Collect
我正在尝试在我的 spring-boot 应用程序中使用 thymeleaf 处理表单提交,我集成了 this example在我的应用程序上运行良好。我试图稍微改变一下,但这就是我得到的异常(exc
我正在尝试执行一个简单的缓存任务。我有一个 Holiday 对象,它有两个字段:referenceDate 和 isHoliday。然后我有一个方法可以向 rest api 发出 HTTP 请求,以检
预期结果 数据绑定(bind)后,网页应该反射(reflect)数据 详情 Controller code @Controller @Configuration @Component public c
beans.xml 异常(exception): Caused by: org.springframework.expression.spel.SpelEvaluationExcepti
我为我的 Web 应用程序完全配置了 SPRING METHOD 安全性。 (启用 PRE/POST 注释)。 但是最近我遇到了一个奇怪的问题。总结如下: POJOS总结 // User Class
我的代码: 类别-flow.xml [...] DefaultCa
我在使用特定方法测试我的休息 Controller 时遇到错误。我正在使用 @Query 注释来执行我的数据库查询。它使用“principal.username”来做到这一点。我没有关于如何在我的应用
我在使用 Spring Security 和 GraphQL 时遇到问题。 我有两个类似的类(class): UserProfileQuery: @Component @AllArgsConstruc
创建名称为“scopedTarget.data.migrator.nameWriter”的 bean 时出错 因此,我们从数据库中获取记录,对于此查询,我们有 100000 条记录。我们使用 Spri
我有 thymeleaf html 页面,内容如下: State Country Total case reported
我正在尝试编写一个简单的 Controller ,它将 POST 数据从 HTML 表单发送到某个 REST 端点。 这是我的 Controller 的样子: package com.integrat
我有一个 Spring 批处理/集成作业,它应该轮询 FTP 服务器,获取所有 .txt 文件,使用 Spring Batch 组件转换它们,然后将它们放入队列(使用 ActiveMQ 实现)。但是,
我向我的项目添加了一个类 CustomPermissionEvaluator,由配置类 MethodSecurityConfig 配置,但是当我尝试运行我的应用程序时,在我通知我的登录凭据后,我收到此
我正在开发一个 Spring Roo 应用程序,在显示列表中的对象(在 list.jspx 中)时,我获得了引用对象的所有属性。例如: @RooJavaBean @RooToString @Ro
我正在使用 Spring Integration 2.2.1 和 int-jpa: inbound-channel-adaptor。我遇到了异常 org.springframework.express
我是一名优秀的程序员,十分优秀!