“java.lang.IllegalArgumentException: Failed to evaluate expression ‘ROLE_USER’”报错的解决

这个问题出现在Spring Security的相关配置中,找到原来的这一行:

<security:intercept-url pattern="/**" access="ROLE_USER"/>

改成以下内容问题得以解决:
<security:intercept-url pattern="/**" access="hasRole(‘ROLE_USER‘)"/>

当然,如果你配置好了SS 的<http auto-config="true">参数,如果不能实现自动跳转到SS的自动登录页,页是需要写对"hasRole(‘ROLE_USER‘)"这行代码就可以搞定。

时间: 2024-10-11 11:44:16

“java.lang.IllegalArgumentException: Failed to evaluate expression ‘ROLE_USER’”报错的解决的相关文章

Android 编程下 java.lang.NoClassDefFoundError: cn.jpush.android.api.JPushInterface 报错

使用了极光推送的 jar 包项目在从 SVN 中检出后,假设不又一次对 jar 包和 Bulid Path 进行配置就会抛出 java.lang.NoClassDefFoundError: cn.jpush.android.api.JPushInterface 的错误,进行例如以下操作就可以消除这样的错误: 删除 libs 目录下的 jpush-sdk-release1.3.8.jar(极光推送的 jar 包),又一次在 libs 目录中增加  jpush-sdk-release1.3.8.ja

java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonProcessingException 报错

在测试testSave方法是报错 具体报错如下: 1 java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonProcessingException 2 3 at java.lang.Class.getDeclaredMethods0(Native Method) 4 at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) 5 at java.lang.Cla

java.lang.IllegalArgumentException: Can&#39;t convert argument: null

从SVN下载项目后,我把项目名称改了一下然后启动tomcat后就一直报java.lang.IllegalArgumentException: Can't convert argument: null这个错. 解决办法是:第一步.将web.xml文件的头文件以javaee:开始的命名空间删除.如图: 第二步:将web.xml文件中所有javaee:替换成空白.如图: 重启tomcat,问题解决! java.lang.IllegalArgumentException: Can't convert a

spring3.2.0与mybatis3.2.7整合出错--Failed to read candidate component class--nested exception is java.lang.IllegalArgumentException

错误信息如下: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [D:\myworkspace\javaweb\20160530-spring_mybatis\bin\com\dzq\ssm\mapper\UserMapper.class]; nested exception is java.lang.IllegalArgu

Hive报错 Failed with exception java.io.IOException:java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:user.name%7D

报错信息如下 Failed with exception java.io.IOException:java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:user.name%7D 解决方法: 编辑 hive-site.xml 文件,添加下边的属性 <property> <name>system:java.io.tmpdir<

解决kylin报错:Failed to create dictionary on &lt;db&gt;.&lt;table&gt;, Caused by: java.lang.IllegalArgumentException: Too high cardinality is not suitable for dictionary

报错信息: 2017-05-13 15:14:30,035 DEBUG [pool-9-thread-10] dict.DictionaryGenerator:94 : Dictionary class: org.apache.kylin.dict.TrieDictionary 2017-05-13 15:14:30,036 ERROR [pool-9-thread-10] common.HadoopShellExecutable:65 : error execute HadoopShellEx

异常:Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException

这个异常是出现在注入配置文件中配置好的属性时报错的: Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'my.name' in value "${my.name}" 此时配置文件默认的名称为:application.properties 解决方法: 将配置文件名改为:appli

HTTP Status 500 - Request processing failed; nested exception is java.lang.IllegalArgumentException: Control character in cookie value or attribute.

1 HTTP Status 500 - Request processing failed; nested exception is java.lang.IllegalArgumentException: Control character in cookie value or attribute. 2 type Exception report 3 4 message Request processing failed; nested exception is java.lang.Illega

Kafka日志报错:[error] k.m.j.KafkaJMX$ - Failed to connect to service:jmx:rmi:///jndi/rmi://10.1.3.116:-1/jmxrmi java.lang.IllegalArgumentException: requirement failed: No jmx port but jmx polling enabled!

一.Kafka日志报错:[error] k.m.j.KafkaJMX$ - Failed to connect to service:jmx:rmi:///jndi/rmi://10.1.3.116:-1/jmxrmi java.lang.IllegalArgumentException: requirement failed: No jmx port but jmx polling enabled! 以上报错,并没有对Kafka对使用造成直接影响: 1>.启动生产者:kafka-console