mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-05 18:23:47 +08:00
v3.10.0【新增】全屏模式Modal等终极解决方案;【新增】生成环境去掉跨域;【优化】其他一些小细节
This commit is contained in:
@@ -2,6 +2,7 @@ package net.lab1024.sa.base.config;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Conditional;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.cors.CorsConfiguration;
|
||||
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
||||
@@ -17,6 +18,7 @@ import org.springframework.web.filter.CorsFilter;
|
||||
* @Copyright <a href="https://1024lab.net">1024创新实验室</a>
|
||||
*/
|
||||
@Configuration
|
||||
@Conditional(SystemEnvironmentConfig.class)
|
||||
public class CorsFilterConfig {
|
||||
|
||||
@Value("${access-control-allow-origin}")
|
||||
|
||||
@@ -96,8 +96,8 @@ public class AddFormVariableService extends CodeGenerateBaseVariableService {
|
||||
if (Boolean.TRUE.equals(field.getRequiredFlag())) {
|
||||
String notEmptyPrefix = "String".equals(codeField.getJavaType()) ? "@NotBlank" : "@NotNull";
|
||||
finalFieldMap.put("notEmpty", "\n " + notEmptyPrefix + "(message = \"" + codeField.getLabel() + " 不能为空\")");
|
||||
packageList.add("String".equals(codeField.getJavaType()) ? "import javax.validation.constraints.NotBlank;"
|
||||
: "import javax.validation.constraints.NotNull;");
|
||||
packageList.add("String".equals(codeField.getJavaType()) ? "import jakarta.validation.constraints.NotBlank;"
|
||||
: "import jakarta.validation.constraints.NotNull;");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ public class UpdateFormVariableService extends CodeGenerateBaseVariableService {
|
||||
if (Boolean.TRUE.equals(field.getRequiredFlag())) {
|
||||
String notEmptyPrefix = "String".equals(codeField.getJavaType()) ? "@NotBlank" : "@NotNull";
|
||||
finalFieldMap.put("notEmpty", "\n " + notEmptyPrefix + "(message = \"" + codeField.getLabel() + " 不能为空\")");
|
||||
packageList.add("String".equals(codeField.getJavaType()) ? "import javax.validation.constraints.NotBlank;" : "import javax.validation.constraints.NotNull;");
|
||||
packageList.add("String".equals(codeField.getJavaType()) ? "import jakarta.validation.constraints.NotBlank;" : "import jakarta.validation.constraints.NotNull;");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ public class DictService {
|
||||
* @return
|
||||
*/
|
||||
public List<DictKeyVO> queryAllKey() {
|
||||
return SmartBeanUtil.copyList(dictKeyDao.selectList(null), DictKeyVO.class);
|
||||
return SmartBeanUtil.copyList(dictKeyDao.selectByDeletedFlag(false), DictKeyVO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,14 +37,14 @@ public interface ${name.upperCamel}Dao extends BaseMapper<${name.upperCamel}Enti
|
||||
/**
|
||||
* 更新删除状态
|
||||
*/
|
||||
long updateDeleted(@Param("${primaryKeyFieldName}")${primaryKeyJavaType} ${primaryKeyFieldName},@Param("${deletedFlag}")boolean deletedFlag);
|
||||
long updateDeleted(@Param("${primaryKeyFieldName}")${primaryKeyJavaType} ${primaryKeyFieldName},@Param("deletedFlag")boolean deletedFlag);
|
||||
|
||||
#end
|
||||
#if($deleteInfo.deleteEnum == "Batch" || $deleteInfo.deleteEnum == "SingleAndBatch")
|
||||
/**
|
||||
* 批量更新删除状态
|
||||
*/
|
||||
void batchUpdateDeleted(@Param("idList")List<${primaryKeyJavaType}> idList,@Param("${deletedFlag}")boolean deletedFlag);
|
||||
void batchUpdateDeleted(@Param("idList")List<${primaryKeyJavaType}> idList,@Param("deletedFlag")boolean deletedFlag);
|
||||
|
||||
#end
|
||||
#end
|
||||
|
||||
@@ -40,7 +40,7 @@ spring:
|
||||
host: smtp.163.com
|
||||
port: 465
|
||||
username: lab1024@163.com
|
||||
password: LAB1024LAB
|
||||
password: ROIMSIQCEXHTQFTA
|
||||
properties:
|
||||
mail:
|
||||
smtp:
|
||||
|
||||
@@ -21,26 +21,24 @@ spring:
|
||||
pointcut: net.lab1024.sa..*Service.*
|
||||
|
||||
# redis 连接池配置信息
|
||||
data:
|
||||
redis:
|
||||
database: 1
|
||||
host: 127.0.0.1
|
||||
port: 6379
|
||||
password:
|
||||
timeout: 10000ms
|
||||
lettuce:
|
||||
pool:
|
||||
max-active: 5
|
||||
min-idle: 1
|
||||
max-idle: 3
|
||||
max-wait: 30000ms
|
||||
|
||||
redis:
|
||||
database: 1
|
||||
host: 127.0.0.1
|
||||
port: 6379
|
||||
password:
|
||||
timeout: 10000ms
|
||||
lettuce:
|
||||
pool:
|
||||
max-active: 100
|
||||
min-idle: 10
|
||||
max-idle: 50
|
||||
max-wait: 30000ms
|
||||
# 邮件,置以SSL的方式发送, 这个需要使用这种方式并且端口是465
|
||||
mail:
|
||||
host: smtp.163.com
|
||||
port: 465
|
||||
username: lab1024@163.com
|
||||
password: LAB1024LAB
|
||||
password: 1024lab
|
||||
properties:
|
||||
mail:
|
||||
smtp:
|
||||
@@ -119,9 +117,6 @@ http:
|
||||
write-timeout: 50000
|
||||
keep-alive: 300000
|
||||
|
||||
# 跨域配置
|
||||
access-control-allow-origin: 'https://preview.smartadmin.vip'
|
||||
|
||||
# 心跳配置
|
||||
heart-beat:
|
||||
interval-seconds: 60
|
||||
|
||||
Reference in New Issue
Block a user