-
Notifications
You must be signed in to change notification settings - Fork 82
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
TokenBucketAlgorithmImpl这个类里面的rateLimiter这个对象是怎么注入进去的 #5
Comments
有没有增加启动注解@EnableSyjRateLimit呢,如果增加了启动注解的话会在EnableSyjRateLimitConfiguration这个类里面自动装配的 |
@EnableSyjRateLimit 这个注解加了 |
这个对象注入主要是使用了Lombok插件的@requiredargsconstructor,这个注解为类提供了一个包含带有@nonnull注解变量的构造方法,Spring在执行时就会自动把这些变量注入进去。你的情况可能是因为本地开发工具没有集成Lombok的原因。可以选择使用maven中央仓库的依赖或者开发工具增加Lombok集成环境 |
嗯 应该是这个原因 |
我下载到源码后 必须在rateLimiter这个变量上加@Autowired这个注解才能注册进去值 否则 打印出来rateLimiter为空
是我的环境的问题?还是框架有问题呢?
The text was updated successfully, but these errors were encountered: