org.springframework.beans.NotReadablePropertyException: Invalid property ‘principal.originAdmin’ of bean class [org.springframework.security.authentication.AnonymousAuthenticationToken]: Bean property ‘principal.originAdmin’ is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
at org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyValue(AbstractNestablePropertyAccessor.java:631)
at org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyValue(AbstractNestablePropertyAccessor.java:622)
at org.springframework.security.taglibs.authz.AuthenticationTag.doEndTag(AuthenticationTag.java:104)
at org.apache.jsp.WEB_002dINF.jsp.admin_002dpage_jsp._jspx_meth_security_005fauthentication_005f0(admin_002dpage_jsp.java:462)
at org.apache.jsp.WEB_002dINF.jsp.admin_002dpage_jsp._jspService(admin_002dpage_jsp.java:301)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:476)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
原因是加入security之后没有重新登录,而是直接访问登录成功的界面
并没有匹配到数据
重新到登录界面登录即可
springsecurity报错NotReadablePropertyException: Invalid property 'principal.originAdmin' of bean class
最新推荐文章于 2023-08-04 14:15:43 发布