-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyUtil.getKey() 里面 limitEntity.getLimitType() 空指针异常 #1
Comments
limit.type = redis/local 你需要在配置文件一下 |
已经在配置文件配置了,但还是报了空指针异常 |
解决了吗
|
同遇到 |
我也遇到了这个问题, 通过查看官方的example,发现需要在配置文件中指定限制规则 ; limit.filter=true
limit.rule.url.num=100
limit.rule.url.seconds=2
limit.rule.identifier.key=userId 上面会按照url的规则来拦截 ,希望能够提供一个默认的拦截方式,否则如果不配置会出现上面的NPE问题 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
java.lang.NullPointerException: null
at io.github.forezp.distributedlimitcore.util.KeyUtil.getKey(KeyUtil.java:20) ~[distributed-limit-core-1.0.4.jar:na]
at io.github.forezp.distributedlimitcore.limit.RedisLimitExcutor.tryAccess(RedisLimitExcutor.java:43) ~[distributed-limit-core-1.0.4.jar:na]
at io.github.forezp.distributedlimitcore.aop.LimitAop.before(LimitAop.java:77) ~[distributed-limit-core-1.0.4.jar:na]
at sun.reflect.GeneratedMethodAccessor526.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:45005) ~[na:1.8.0_112]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_112]
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644) ~[spring-aop-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:626) ~[spring-aop-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.aop.aspectj.AspectJMethodBeforeAdvice.before(AspectJMethodBeforeAdvice.java:44) ~[spring-aop-5.0.5.RELEASE.jar:5.0.5.RELEASE]
The text was updated successfully, but these errors were encountered: