This commit is contained in:
xxx 2023-08-29 14:21:43 +08:00
parent 4387471d76
commit 76dceaa44d
5 changed files with 5 additions and 7 deletions

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package xyz.playedu.system.interceptor; package xyz.playedu.api.interceptor;
import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package xyz.playedu.system.interceptor; package xyz.playedu.api.interceptor;
import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package xyz.playedu.system.interceptor; package xyz.playedu.api.interceptor;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;

View File

@ -17,5 +17,5 @@ package xyz.playedu.common.service;
public interface RateLimiterService { public interface RateLimiterService {
public Long current(String key, Long seconds); Long current(String key, Long seconds);
} }

View File

@ -37,8 +37,6 @@ public class RateLimiterServiceImpl implements RateLimiterService {
@Override @Override
public Long current(String key, Long seconds) { public Long current(String key, Long seconds) {
Long current = RedisUtil.handler().execute(redisScript, Arrays.asList(key, seconds + "")); return RedisUtil.handler().execute(redisScript, Arrays.asList(key, seconds + ""));
log.info("key={},count={}", key, current);
return current;
} }
} }