commit:同步2.3版本

This commit is contained in:
Jerry
2022-02-20 13:40:36 +08:00
parent c7cc3f5354
commit cbe0f7947d
668 changed files with 172592 additions and 821 deletions

View File

@@ -1,7 +1,8 @@
package com.orangeforms.uaaadmin;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;
/**
@@ -10,8 +11,9 @@ import org.springframework.context.annotation.ComponentScan;
* @author Jerry
* @date 2020-08-08
*/
@SpringCloudApplication
@ComponentScan("com.orangeforms")
@EnableDiscoveryClient
@SpringBootApplication
public class UaaAdminApplication {
public static void main(String[] args) {

View File

@@ -24,10 +24,14 @@ public class CorsConfig {
UrlBasedCorsConfigurationSource configSource = new UrlBasedCorsConfigurationSource();
CorsConfiguration corsConfiguration = new CorsConfiguration();
if (StringUtils.isNotBlank(applicationConfig.getCredentialIpList())) {
String[] credentialIpList = StringUtils.split(applicationConfig.getCredentialIpList(), ",");
if (credentialIpList.length > 0) {
for (String ip : credentialIpList) {
corsConfiguration.addAllowedOrigin(ip);
if ("*".equals(applicationConfig.getCredentialIpList())) {
corsConfiguration.addAllowedOriginPattern("*");
} else {
String[] credentialIpList = StringUtils.split(applicationConfig.getCredentialIpList(), ",");
if (credentialIpList.length > 0) {
for (String ip : credentialIpList) {
corsConfiguration.addAllowedOrigin(ip);
}
}
}
corsConfiguration.addAllowedHeader("*");

View File

@@ -1,8 +1,8 @@
package com.orangeforms.uaaadmin.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.orangeforms.common.core.base.dao.BaseDaoMapper;
import com.orangeforms.common.core.base.service.BaseService;
import com.orangeforms.common.core.constant.GlobalDeletedFlag;
import com.orangeforms.common.core.object.MyRelationParam;
import com.orangeforms.common.core.util.MyModelUtil;
import com.orangeforms.common.sequence.wrapper.IdGeneratorWrapper;
@@ -54,6 +54,7 @@ public class SysUaaUserServiceImpl extends BaseService<SysUaaUser, Long> impleme
sysUaaUser.setUserId(idGenerator.nextLongId());
sysUaaUser.setPassword(passwordEncoder.encode(sysUaaUser.getPassword()));
MyModelUtil.fillCommonsForInsert(sysUaaUser);
sysUaaUser.setDeletedFlag(GlobalDeletedFlag.NORMAL);
sysUaaUserMapper.insert(sysUaaUser);
return sysUaaUser;
}

View File

@@ -22,6 +22,7 @@
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-oauth2</artifactId>
<version>2.2.5.RELEASE</version>
<exclusions>
<exclusion>
<groupId>org.springframework.security.oauth</groupId>

View File

@@ -1,7 +1,8 @@
package com.orangeforms.uaaauth;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;
/**
@@ -10,8 +11,9 @@ import org.springframework.context.annotation.ComponentScan;
* @author Jerry
* @date 2020-08-08
*/
@SpringCloudApplication
@ComponentScan("com.orangeforms")
@EnableDiscoveryClient
@SpringBootApplication
public class UaaAuthApplication {
public static void main(String[] args) {