mirror of https://gitee.com/maxjhandsome/pig
⬆️ Upgrading dependencies. #I1HE98 up spring boot 2.3.0
This commit is contained in:
parent
856a4f7f81
commit
046d82ef5a
|
@ -4,12 +4,12 @@
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="https://img.shields.io/badge/Pig-2.7-success.svg" alt="Build Status">
|
<img src="https://img.shields.io/badge/Pig-2.7-success.svg" alt="Build Status">
|
||||||
<img src="https://img.shields.io/badge/Avue-2.3-green.svg" alt="Build Status">
|
<img src="https://img.shields.io/badge/Avue-2.5-green.svg" alt="Build Status">
|
||||||
<img src="https://img.shields.io/badge/Spring%20Cloud-Hoxto.SR4-blue.svg" alt="Coverage Status">
|
<img src="https://img.shields.io/badge/Spring%20Cloud-Hoxto.SR4-blue.svg" alt="Coverage Status">
|
||||||
<img src="https://img.shields.io/badge/Spring%20Boot-2.2.RELEASE-blue.svg" alt="Downloads">
|
<img src="https://img.shields.io/badge/Spring%20Boot-2.3.RELEASE-blue.svg" alt="Downloads">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
- based on Spring Cloud Hoxton 、Spring Boot 2.2、 OAuth2 RBAC web framework
|
- based on Spring Cloud Hoxton 、Spring Boot 2.3、 OAuth2 RBAC web framework
|
||||||
- Idea based on data-driven view, if you don't use vue, you can get started quickly
|
- Idea based on data-driven view, if you don't use vue, you can get started quickly
|
||||||
- provide support for common containers like Docker、Kubernetes、Rancher2
|
- provide support for common containers like Docker、Kubernetes、Rancher2
|
||||||
- provide lambda 、stream api 、webflux production practice
|
- provide lambda 、stream api 、webflux production practice
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
dependencies | version
|
dependencies | version
|
||||||
---|---
|
---|---
|
||||||
Spring Boot | 2.2.7.RELEASE
|
Spring Boot | 2.3.0.RELEASE
|
||||||
Spring Cloud | Hoxton.SR4
|
Spring Cloud | Hoxton.SR4
|
||||||
Spring Security OAuth2 | 2.3.6
|
Spring Security OAuth2 | 2.3.6
|
||||||
Mybatis Plus | 3.3.1
|
Mybatis Plus | 3.3.1
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="https://img.shields.io/badge/Pig-2.7-success.svg" alt="Build Status">
|
<img src="https://img.shields.io/badge/Pig-2.7-success.svg" alt="Build Status">
|
||||||
<img src="https://img.shields.io/badge/Avue-2.3-green.svg" alt="Build Status">
|
<img src="https://img.shields.io/badge/Avue-2.5-green.svg" alt="Build Status">
|
||||||
<img src="https://img.shields.io/badge/Spring%20Cloud-Hoxto.SR4-blue.svg" alt="Coverage Status">
|
<img src="https://img.shields.io/badge/Spring%20Cloud-Hoxto.SR4-blue.svg" alt="Coverage Status">
|
||||||
<img src="https://img.shields.io/badge/Spring%20Boot-2.2.RELEASE-blue.svg" alt="Downloads">
|
<img src="https://img.shields.io/badge/Spring%20Boot-2.3.RELEASE-blue.svg" alt="Downloads">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
- 基于 Spring Cloud Hoxton 、Spring Boot 2.2、 OAuth2 的RBAC权限管理系统
|
- 基于 Spring Cloud Hoxton 、Spring Boot 2.3、 OAuth2 的RBAC权限管理系统
|
||||||
- 基于数据驱动视图的理念封装 element-ui,即使没有 vue 的使用经验也能快速上手
|
- 基于数据驱动视图的理念封装 element-ui,即使没有 vue 的使用经验也能快速上手
|
||||||
- 提供对常见容器化支持 Docker、Kubernetes、Rancher2 支持
|
- 提供对常见容器化支持 Docker、Kubernetes、Rancher2 支持
|
||||||
- 提供 lambda 、stream api 、webflux 的生产实践
|
- 提供 lambda 、stream api 、webflux 的生产实践
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
依赖 | 版本
|
依赖 | 版本
|
||||||
---|---
|
---|---
|
||||||
Spring Boot | 2.2.7.RELEASE
|
Spring Boot | 2.3.0.RELEASE
|
||||||
Spring Cloud | Hoxton.SR4
|
Spring Cloud | Hoxton.SR4
|
||||||
Spring Security OAuth2 | 2.3.6
|
Spring Security OAuth2 | 2.3.6
|
||||||
Mybatis Plus | 3.3.1
|
Mybatis Plus | 3.3.1
|
||||||
|
|
|
@ -22,11 +22,12 @@ import com.baomidou.dynamic.datasource.DynamicRoutingDataSource;
|
||||||
import com.baomidou.dynamic.datasource.creator.DataSourceCreator;
|
import com.baomidou.dynamic.datasource.creator.DataSourceCreator;
|
||||||
import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DataSourceProperty;
|
import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DataSourceProperty;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.pig4cloud.pig.codegen.service.GenDatasourceConfService;
|
|
||||||
import com.pig4cloud.pig.codegen.entity.GenDatasourceConf;
|
import com.pig4cloud.pig.codegen.entity.GenDatasourceConf;
|
||||||
import com.pig4cloud.pig.codegen.mapper.GenDatasourceConfMapper;
|
import com.pig4cloud.pig.codegen.mapper.GenDatasourceConfMapper;
|
||||||
|
import com.pig4cloud.pig.codegen.service.GenDatasourceConfService;
|
||||||
|
import com.pig4cloud.pig.common.core.util.SpringContextHolder;
|
||||||
import com.pig4cloud.pig.common.datasource.support.DataSourceConstants;
|
import com.pig4cloud.pig.common.datasource.support.DataSourceConstants;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jasypt.encryption.StringEncryptor;
|
import org.jasypt.encryption.StringEncryptor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
@ -43,11 +44,10 @@ import java.sql.SQLException;
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
@AllArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class GenDatasourceConfServiceImpl extends ServiceImpl<GenDatasourceConfMapper, GenDatasourceConf> implements GenDatasourceConfService {
|
public class GenDatasourceConfServiceImpl extends ServiceImpl<GenDatasourceConfMapper, GenDatasourceConf> implements GenDatasourceConfService {
|
||||||
private DynamicRoutingDataSource dynamicRoutingDataSource;
|
|
||||||
private final StringEncryptor stringEncryptor;
|
private final StringEncryptor stringEncryptor;
|
||||||
private DataSourceCreator dataSourceCreator;
|
private final DataSourceCreator dataSourceCreator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存数据源并且加密
|
* 保存数据源并且加密
|
||||||
|
@ -83,8 +83,8 @@ public class GenDatasourceConfServiceImpl extends ServiceImpl<GenDatasourceConfM
|
||||||
return Boolean.FALSE;
|
return Boolean.FALSE;
|
||||||
}
|
}
|
||||||
//先移除
|
//先移除
|
||||||
dynamicRoutingDataSource.removeDataSource(
|
SpringContextHolder.getBean(DynamicRoutingDataSource.class)
|
||||||
baseMapper.selectById(conf.getId()).getName());
|
.removeDataSource(baseMapper.selectById(conf.getId()).getName());
|
||||||
|
|
||||||
//再添加
|
//再添加
|
||||||
addDynamicDataSource(conf);
|
addDynamicDataSource(conf);
|
||||||
|
@ -106,8 +106,8 @@ public class GenDatasourceConfServiceImpl extends ServiceImpl<GenDatasourceConfM
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean removeByDsId(Integer dsId) {
|
public Boolean removeByDsId(Integer dsId) {
|
||||||
dynamicRoutingDataSource.removeDataSource(
|
SpringContextHolder.getBean(DynamicRoutingDataSource.class)
|
||||||
baseMapper.selectById(dsId).getName());
|
.removeDataSource(baseMapper.selectById(dsId).getName());
|
||||||
this.baseMapper.deleteById(dsId);
|
this.baseMapper.deleteById(dsId);
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,8 @@ public class GenDatasourceConfServiceImpl extends ServiceImpl<GenDatasourceConfM
|
||||||
dataSourceProperty.setPassword(conf.getPassword());
|
dataSourceProperty.setPassword(conf.getPassword());
|
||||||
dataSourceProperty.setDriverClassName(DataSourceConstants.DS_DRIVER);
|
dataSourceProperty.setDriverClassName(DataSourceConstants.DS_DRIVER);
|
||||||
DataSource dataSource = dataSourceCreator.createDataSource(dataSourceProperty);
|
DataSource dataSource = dataSourceCreator.createDataSource(dataSourceProperty);
|
||||||
dynamicRoutingDataSource.addDataSource(dataSourceProperty.getPollName(), dataSource);
|
SpringContextHolder.getBean(DynamicRoutingDataSource.class)
|
||||||
|
.addDataSource(dataSourceProperty.getPollName(), dataSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -38,6 +38,6 @@ public class ApplicationLoggerInitializer implements ApplicationContextInitializ
|
||||||
|
|
||||||
String logBase = environment.getProperty("LOGGING_PATH", "logs");
|
String logBase = environment.getProperty("LOGGING_PATH", "logs");
|
||||||
// spring boot admin 直接加载日志
|
// spring boot admin 直接加载日志
|
||||||
System.setProperty("logging.file", String.format("%s/%s/debug.log", logBase, appName));
|
System.setProperty("logging.file.name", String.format("%s/%s/debug.log", logBase, appName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
3
pom.xml
3
pom.xml
|
@ -35,7 +35,7 @@
|
||||||
<url>https://www.pig4cloud.com</url>
|
<url>https://www.pig4cloud.com</url>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<spring-boot.version>2.2.7.RELEASE</spring-boot.version>
|
<spring-boot.version>2.3.0.RELEASE</spring-boot.version>
|
||||||
<spring-cloud.version>Hoxton.SR4</spring-cloud.version>
|
<spring-cloud.version>Hoxton.SR4</spring-cloud.version>
|
||||||
<spring-cloud-alibaba.version>2.2.1.RELEASE</spring-cloud-alibaba.version>
|
<spring-cloud-alibaba.version>2.2.1.RELEASE</spring-cloud-alibaba.version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
@ -67,6 +67,7 @@
|
||||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!--配置文件加解密-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.ulisesbocchio</groupId>
|
<groupId>com.github.ulisesbocchio</groupId>
|
||||||
<artifactId>jasypt-spring-boot-starter</artifactId>
|
<artifactId>jasypt-spring-boot-starter</artifactId>
|
||||||
|
|
Loading…
Reference in New Issue