mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-17 10:36:31 +08:00
commit:同步2.3版本
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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("*");
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user