3 Commits

Author SHA1 Message Date
czx
ee869cf263 Update index.vue.vm 2025-08-15 17:34:49 +08:00
czx
9eebbb579f 修改代码生成器 2025-08-15 16:40:23 +08:00
czx
5f586f7f7b 修改redis 2025-08-15 15:59:21 +08:00
10 changed files with 12 additions and 21 deletions

View File

@@ -42,7 +42,7 @@ import java.util.List;
public class SecurityConfigurer {
@Resource
private RedisTemplate<Object, Object> redisTemplate;
private RedisTemplate<String, Object> redisTemplate;
@Resource
private AuthIgnoreConfig authIgnoreConfig;

View File

@@ -36,7 +36,7 @@ import java.util.concurrent.TimeUnit;
public class CustomAuthenticationSuccessHandler implements AuthenticationSuccessHandler {
@Resource
private RedisTemplate<Object,Object> redisTemplate;
private RedisTemplate<String,Object> redisTemplate;
@SneakyThrows
@Override

View File

@@ -30,7 +30,7 @@ import java.util.Date;
public class CustomLogoutSuccessHandler implements LogoutSuccessHandler {
@Resource
private RedisTemplate<Object,Object> redisTemplate;
private RedisTemplate<String,Object> redisTemplate;
@Override
public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException {

View File

@@ -18,7 +18,7 @@ import java.util.concurrent.TimeUnit;
public class RedisLock {
@Resource
private RedisTemplate<Object, Object> redisTemplate;
private RedisTemplate<String, Object> redisTemplate;
/*** 释放锁脚本原子操作lua脚本*/
private static final String UNLOCK_LUA;
/*** 默认过期时间(30ms)*/

View File

@@ -1,18 +1,17 @@
package com.suke.czx.config;
import com.suke.czx.common.utils.Constant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.data.redis.cache.RedisCacheConfiguration;
import org.springframework.data.redis.cache.RedisCacheManager;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.*;
import org.springframework.data.redis.serializer.RedisSerializationContext;
import org.springframework.data.redis.serializer.RedisSerializer;
import com.suke.czx.common.utils.Constant;
import java.time.Duration;
@@ -22,7 +21,6 @@ import java.time.Duration;
public class RedisConfig {
@Bean
@Primary
public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory factory) {
RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>();
redisTemplate.setKeySerializer(RedisSerializer.string());

View File

@@ -31,10 +31,10 @@ import java.io.IOException;
@Slf4j
public class AuthenticationTokenFilter extends OncePerRequestFilter {
private final RedisTemplate<Object,Object> redisTemplate;
private final RedisTemplate<String,Object> redisTemplate;
private final AuthIgnoreConfig authIgnoreConfig;
public AuthenticationTokenFilter(AuthIgnoreConfig authIgnoreConfig,RedisTemplate<Object,Object> template) {
public AuthenticationTokenFilter(AuthIgnoreConfig authIgnoreConfig,RedisTemplate<String,Object> template) {
this.redisTemplate = template;
this.authIgnoreConfig = authIgnoreConfig;
}

View File

@@ -22,10 +22,10 @@ import org.springframework.web.filter.OncePerRequestFilter;
public class ValidateCodeFilter extends OncePerRequestFilter {
private final AntPathMatcher pathMatcher = new AntPathMatcher();
private final RedisTemplate<Object,Object> redisTemplate;
private final RedisTemplate<String,Object> redisTemplate;
private final AuthenticationFailureHandler authenticationFailureHandler;
public ValidateCodeFilter(RedisTemplate<Object,Object> redisTemplate, AuthenticationFailureHandler authenticationFailureHandler){
public ValidateCodeFilter(RedisTemplate<String,Object> redisTemplate, AuthenticationFailureHandler authenticationFailureHandler){
this.redisTemplate = redisTemplate;
this.authenticationFailureHandler = authenticationFailureHandler;
}

View File

@@ -35,7 +35,7 @@ import java.util.concurrent.TimeUnit;
public class SysLoginController extends AbstractController {
private final Producer producer;
private final RedisTemplate<Object,Object> redisTemplate;
private final RedisTemplate<String,Object> redisTemplate;
@AuthIgnore
@RequestMapping(value = "/", method = RequestMethod.GET)

View File

@@ -33,7 +33,6 @@ public class ${className}Controller extends AbstractController {
/**
* 列表
*/
@Operation(summary = "${comments}列表")
@GetMapping("/list")
@ResourceAuth(value = "${comments}列表", module = "${comments}")
public R list(@RequestParam Map<String, Object> params) {

View File

@@ -5,15 +5,9 @@
<el-input size="default" v-model="state.tableData.param.keyword" placeholder="请输入名称"
style="max-width: 180px"></el-input>
<el-button size="default" type="primary" class="ml10" @click="fetchData()">
<el-icon>
<ele-Search/>
</el-icon>
查询
</el-button>
<el-button size="default" type="success" class="ml10" @click="onOpenAddOrEdit('add')">
<el-icon>
<ele-FolderAdd/>
</el-icon>
新增
</el-button>
</div>
@@ -27,8 +21,8 @@
#end
<el-table-column label="操作" width="200">
<template #default="scope">
<el-button size="small" text type="primary" @click="onOpenAddOrEdit('edit', scope.row)">修改</el-button>
<el-button size="small" text type="primary" @click="onRowDel(scope.row)">删除</el-button>
<el-button size="small" type="text" @click="onOpenAddOrEdit('edit', scope.row)">修改</el-button>
<el-button size="small" type="text" @click="onRowDel(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>