Merge pull request #5934 from EightMonth/springboot3_sas

修正springboot3 sas默认配置
pull/6161/head
JEECG 2024-03-01 16:23:13 +08:00 committed by GitHub
commit 20efa3bf9a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 80 additions and 54 deletions

View File

@ -4928,10 +4928,10 @@ CREATE TABLE `sys_gateway_route` (
-- ---------------------------- -- ----------------------------
-- Records of sys_gateway_route -- Records of sys_gateway_route
-- ---------------------------- -- ----------------------------
INSERT INTO `sys_gateway_route` VALUES ('1331051599401857026', 'jeecg-demo-websocket', 'jeecg-demo-websocket', 'lb:ws://jeecg-demo', '[{\"args\":[\"/vxeSocket/**\"],\"name\":\"Path\"}]', '[]', NULL, NULL, NULL, NULL, 1, 'admin', '2020-11-24 09:46:46', NULL, NULL, NULL); INSERT INTO `sys_gateway_route` VALUES ('1331051599401857026', 'jeecg-demo-websocket', 'jeecg-demo-websocket', 'lb:ws://jeecg-demo', '[{\"args\":[\"/vxeSocket/**\"],\"name\":\"Path\"}]', '[{\"args\":[{\"value\":\"#{@ipKeyResolver}\",\"key\":\"key-resolver\"},{\"value\":20,\"key\":\"redis-rate-limiter.replenishRate\"},{\"value\":20,\"key\":\"redis-rate-limiter.burstCapacity\"}],\"name\":\"RequestRateLimiter\",\"title\":\"限流过滤器\"}]', NULL, NULL, NULL, NULL, 1, 'admin', '2020-11-24 09:46:46', NULL, NULL, NULL);
INSERT INTO `sys_gateway_route` VALUES ('jeecg-cloud-websocket', 'jeecg-system-websocket', 'jeecg-system-websocket', 'lb:ws://jeecg-system', '[{\"args\":[\"/websocket/**\",\"/eoaSocket/**\",\"/newsWebsocket/**\"],\"name\":\"Path\"}]', '[]', NULL, NULL, NULL, NULL, 1, 'admin', '2020-11-16 19:41:51', NULL, NULL, NULL); INSERT INTO `sys_gateway_route` VALUES ('jeecg-cloud-websocket', 'jeecg-system-websocket', 'jeecg-system-websocket', 'lb:ws://jeecg-system', '[{\"args\":[\"/websocket/**\",\"/eoaSocket/**\",\"/newsWebsocket/**\"],\"name\":\"Path\"}]', '[]', NULL, NULL, NULL, NULL, 1, 'admin', '2020-11-16 19:41:51', NULL, NULL, NULL);
INSERT INTO `sys_gateway_route` VALUES ('jeecg-demo', 'jeecg-demo', 'jeecg-demo', 'lb://jeecg-demo', '[{\"args\":[\"/mock/**\",\"/bigscreen/template1/**\",\"/bigscreen/template2/**\",\"/test/**\"],\"name\":\"Path\"}]', '[]', NULL, NULL, NULL, NULL, 1, 'admin', '2020-11-16 19:41:51', NULL, NULL, NULL); INSERT INTO `sys_gateway_route` VALUES ('jeecg-demo', 'jeecg-demo', 'jeecg-demo', 'lb://jeecg-demo', '[{\"args\":[\"/mock/**\",\"/bigscreen/template1/**\",\"/bigscreen/template2/**\",\"/test/**\"],\"name\":\"Path\"}]', '[]', NULL, NULL, NULL, NULL, 1, 'admin', '2020-11-16 19:41:51', NULL, NULL, NULL);
INSERT INTO `sys_gateway_route` VALUES ('jeecg-system', 'jeecg-system', 'jeecg-system', 'lb://jeecg-system', '[{\"args\":[\"/sys/**\",\"/online/**\",\"/bigscreen/**\",\"/jmreport/**\",\"/druid/**\",\"/generic/**\",\"/actuator/**\",\"/drag/**\"],\"name\":\"Path\"}]', '[]', NULL, NULL, NULL, NULL, 1, 'admin', '2020-11-16 19:41:51', NULL, NULL, NULL); INSERT INTO `sys_gateway_route` VALUES ('jeecg-system', 'jeecg-system', 'jeecg-system', 'lb://jeecg-system', '[{\"args\":[\"/sys/**\",\"/online/**\",\"/bigscreen/**\",\"/jmreport/**\",\"/druid/**\",\"/generic/**\",\"/actuator/**\",\"/drag/**\",\"/oauth2/**\"],\"name\":\"Path\"}]', '[]', NULL, NULL, NULL, NULL, 1, 'admin', '2020-11-16 19:41:51', NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- Table structure for sys_log -- Table structure for sys_log

File diff suppressed because one or more lines are too long

View File

@ -13,7 +13,7 @@ CREATE TABLE `oauth2_registered_client` (
`client_settings` varchar(2000) NOT NULL, `client_settings` varchar(2000) NOT NULL,
`token_settings` varchar(2000) NOT NULL, `token_settings` varchar(2000) NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
INSERT INTO `oauth2_registered_client` INSERT INTO `oauth2_registered_client`
(`id`, (`id`,

View File

@ -9,6 +9,7 @@ import org.springframework.dao.DuplicateKeyException;
import org.springframework.data.redis.connection.PoolException; import org.springframework.data.redis.connection.PoolException;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.security.access.AccessDeniedException; import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.core.AuthenticationException;
import org.springframework.web.HttpRequestMethodNotSupportedException; import org.springframework.web.HttpRequestMethodNotSupportedException;
import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.ResponseStatus;
@ -16,8 +17,6 @@ import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.multipart.MaxUploadSizeExceededException; import org.springframework.web.multipart.MaxUploadSizeExceededException;
import org.springframework.web.servlet.NoHandlerFoundException; import org.springframework.web.servlet.NoHandlerFoundException;
import javax.naming.AuthenticationException;
/** /**
* *
* *

View File

@ -737,4 +737,16 @@ public interface ISysBaseAPI extends CommonAPI {
@RequestParam(value = "fields", required = false) String[] fields @RequestParam(value = "fields", required = false) String[] fields
); );
@GetMapping("/sys/api/getUserByPhone")
public LoginUser getUserByPhone(@RequestParam("phone") String phone);
@GetMapping("/sys/api/queryAllDictItems")
Map<String,List<DictModel>> queryAllDictItems();
@GetMapping("/sys/api/queryUserDeparts")
List<SysDepartModel> queryUserDeparts(@RequestParam("userId") String userId);
@PostMapping("/sys/api/updateUserDepart")
void updateUserDepart(@RequestParam("username") String username,@RequestParam("orgCode") String orgCode,@RequestParam("loginTenantId") Integer loginTenantId);
} }

View File

@ -897,4 +897,24 @@ public class SystemApiController {
return sysBaseApi.dictTableWhiteListCheckByDict(tableOrDictCode, fields); return sysBaseApi.dictTableWhiteListCheckByDict(tableOrDictCode, fields);
} }
@GetMapping("/sys/api/getUserByPhone")
public LoginUser getUserByPhone(String phone) {
return sysBaseApi.getUserByPhone(phone);
}
@GetMapping("/sys/api/queryAllDictItems")
public Map<String,List<DictModel>> queryAllDictItems() {
return sysBaseApi.queryAllDictItems();
}
@GetMapping("/sys/api/queryUserDeparts")
public List<SysDepartModel> queryUserDeparts(@RequestParam("userId") String userId) {
return sysBaseApi.queryUserDeparts(userId);
}
@PostMapping("/sys/api/updateUserDepart")
public void updateUserDepart(@RequestParam("username") String username,@RequestParam("orgCode") String orgCode,@RequestParam("loginTenantId") Integer loginTenantId) {
sysBaseApi.updateUserDepart(username, orgCode, loginTenantId);
}
} }

View File

@ -61,7 +61,7 @@ public class SysUser implements Serializable {
/** /**
* md5 * md5
*/ */
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY) @JsonProperty(access = JsonProperty.Access.READ_WRITE)
private String salt; private String salt;
/** /**

View File

@ -12,7 +12,7 @@ spring:
db: db:
num: 1 num: 1
password: password:
'0': ${MYSQL-PWD:root@2023} '0': ${MYSQL-PWD:root}
url: url:
'0': jdbc:mysql://${MYSQL-HOST:jeecg-boot-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:nacos}?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true '0': jdbc:mysql://${MYSQL-HOST:jeecg-boot-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:nacos}?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
user: user:

View File

@ -7,18 +7,18 @@ spring:
cloud: cloud:
nacos: nacos:
config: config:
server-addr: localhost:8848 server-addr: @config.server-addr@
# group: @config.group@ group: @config.group@
# namespace: @config.namespace@ namespace: @config.namespace@
# username: @config.username@ username: @config.username@
# password: @config.password@ password: @config.password@
discovery: discovery:
server-addr: ${spring.cloud.nacos.config.server-addr} server-addr: ${spring.cloud.nacos.config.server-addr}
# group: @config.group@ group: @config.group@
# namespace: @config.namespace@ namespace: @config.namespace@
# username: @config.username@ username: @config.username@
# password: @config.password@ password: @config.password@
config: config:
import: import:
- optional:nacos:jeecg.yaml - optional:nacos:jeecg.yaml
- optional:nacos:jeecg-dev.yaml - optional:nacos:jeecg-@profile.name@.yaml

View File

@ -475,7 +475,7 @@
<!--Nacos服务地址--> <!--Nacos服务地址-->
<config.server-addr>jeecg-boot-nacos:8848</config.server-addr> <config.server-addr>jeecg-boot-nacos:8848</config.server-addr>
<!--Nacos配置中心命名空间,用于支持多环境.这里必须使用ID不能使用名称,默认为空--> <!--Nacos配置中心命名空间,用于支持多环境.这里必须使用ID不能使用名称,默认为空-->
<config.namespace></config.namespace> <config.namespace>efc4e412-b1a1-498f-ba01-b31807649a9a</config.namespace>
<!--Nacos配置分组名称--> <!--Nacos配置分组名称-->
<config.group>DEFAULT_GROUP</config.group> <config.group>DEFAULT_GROUP</config.group>
<!--Nacos用户名--> <!--Nacos用户名-->
@ -505,7 +505,7 @@
<!--Nacos服务地址--> <!--Nacos服务地址-->
<config.server-addr>jeecg-boot-nacos:8848</config.server-addr> <config.server-addr>jeecg-boot-nacos:8848</config.server-addr>
<!--Nacos配置中心命名空间,用于支持多环境.这里必须使用ID不能使用名称,默认为空--> <!--Nacos配置中心命名空间,用于支持多环境.这里必须使用ID不能使用名称,默认为空-->
<config.namespace></config.namespace> <config.namespace>efc4e412-b1a1-498f-ba01-b31807649a9a</config.namespace>
<!--Nacos配置分组名称--> <!--Nacos配置分组名称-->
<config.group>DEFAULT_GROUP</config.group> <config.group>DEFAULT_GROUP</config.group>
<!--Nacos用户名--> <!--Nacos用户名-->
@ -523,7 +523,7 @@
<!--Nacos服务地址--> <!--Nacos服务地址-->
<config.server-addr>jeecg-boot-nacos:8848</config.server-addr> <config.server-addr>jeecg-boot-nacos:8848</config.server-addr>
<!--Nacos配置中心命名空间,用于支持多环境.这里必须使用ID不能使用名称,默认为空--> <!--Nacos配置中心命名空间,用于支持多环境.这里必须使用ID不能使用名称,默认为空-->
<config.namespace></config.namespace> <config.namespace>efc4e412-b1a1-498f-ba01-b31807649a9a</config.namespace>
<!--Nacos配置分组名称--> <!--Nacos配置分组名称-->
<config.group>DEFAULT_GROUP</config.group> <config.group>DEFAULT_GROUP</config.group>
<!--Nacos用户名--> <!--Nacos用户名-->