Closed Priyanka-khadke closed 5 years ago
It tries to get the rate entity based on key from mysql,and at the library class JpaRateLimiter.getRate(JpaRateLimiter.java:43) it throws NoSuchMethodError
Hi @Priyanka-khadke I'm sorry for the delay, the problem you are facing is related to the versions, if you are using spring boot on 1.x.x
line you should use the rate limit on 1.7.x
line instead of 2.x.x
Thank you so much marco,it worked:)
Hi Marcos, One small query ,i just browsed through some of the comments /suggestions given for your rate limit library, and i got to know that someone has suggested to include a new type , i.e by clientId of oauth2 token and i wanted to know if the feature is implemented in your library?If not by when can we expect? I wanted to this feature in my application, so just wanted to know about the status. It would be of great help if this feature is included in your library.
Hi @Priyanka-khadke I started to work on it but I didn't have time to finish it just yet, there's a branch with some WIP here in this repo.
Ok thanks for the information :)
i was trying to use your library to add ratelimit feature to the rest api's.I am using the type as origin and the repository type as JPA. I'm using mysql as my database and have configured the same in properties file. My application runs without any issue but when i try to send the http request to my endpoint using postman client,it gives error response as this: { "timestamp": 1562646339330, "status": 500, "error": "Internal Server Error", "exception": "com.netflix.zuul.exception.ZuulException", "message": "pre:RateLimitPreFilter" } in the console i get this error: Caused by: java.lang.NoSuchMethodError: com.marcosbarbero.cloud.autoconfigure.zuul.ratelimit.config.repository.springdata.RateLimiterRepository.findById(Ljava/lang/Object;)Ljava/util/Optional;
Changes made:
Added the zuul(1.4.7.RELEASE) +ratelimit(2.2.0.RELEASE) and the spring data jpa(1.5.20.RELEASE) dependency added application.yml file with basic zuul properties. Database configuration in application properties file . Controller class with some endpoints SpringBoot Application startup class In the database i can see that a table with the name 'rate' is created but the table is empty.
Can you please tell me what is the issue ,or am i missing any configuration.