From 1cfad8cc5085750234f0002315ce1d315cd1317e Mon Sep 17 00:00:00 2001 From: smallchill Date: Tue, 9 Apr 2019 21:53:04 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E9=9B=86=E6=88=90BladeApplication?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blade-ops/blade-flowdesign/pom.xml | 5 +++-- .../springblade/flowable/FlowDesignApplication.java | 8 +++++--- .../src/main/resources/application-dev.yml | 11 ----------- .../src/main/resources/application-prod.yml | 7 +++++++ .../src/main/resources/application-test.yml | 11 ----------- .../src/main/resources/application.yml | 4 ---- 6 files changed, 15 insertions(+), 31 deletions(-) create mode 100644 blade-ops/blade-flowdesign/src/main/resources/application-prod.yml diff --git a/blade-ops/blade-flowdesign/pom.xml b/blade-ops/blade-flowdesign/pom.xml index 4c9eb5cb..327789ce 100644 --- a/blade-ops/blade-flowdesign/pom.xml +++ b/blade-ops/blade-flowdesign/pom.xml @@ -16,8 +16,9 @@ - org.springframework.boot - spring-boot-starter-web + org.springblade + blade-core-launch + ${bladex.tool.version} org.springframework.boot diff --git a/blade-ops/blade-flowdesign/src/main/java/org/springblade/flowable/FlowDesignApplication.java b/blade-ops/blade-flowdesign/src/main/java/org/springblade/flowable/FlowDesignApplication.java index 4afd1c2e..f92cd37a 100644 --- a/blade-ops/blade-flowdesign/src/main/java/org/springblade/flowable/FlowDesignApplication.java +++ b/blade-ops/blade-flowdesign/src/main/java/org/springblade/flowable/FlowDesignApplication.java @@ -16,8 +16,10 @@ */ package org.springblade.flowable; +import org.flowable.ui.common.conf.DevelopmentConfiguration; import org.flowable.ui.common.rest.idm.remote.RemoteAccountResource; -import org.springframework.boot.SpringApplication; +import org.springblade.core.launch.BladeApplication; +import org.springblade.core.launch.constant.AppConstant; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration; import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration; @@ -43,12 +45,12 @@ import static org.springblade.flowable.constant.FlowableConstant.FLOWABLE_BASE_P ) @ComponentScan( basePackages = {BASE_PACHAGE, FLOWABLE_BASE_PACKAGE}, - excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {RemoteAccountResource.class}) + excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {RemoteAccountResource.class, DevelopmentConfiguration.class}) ) public class FlowDesignApplication { public static void main(String[] args) { - SpringApplication.run(FlowDesignApplication.class, args); + BladeApplication.run(AppConstant.APPLICATION_FLOWDESIGN_NAME, FlowDesignApplication.class, args); } } diff --git a/blade-ops/blade-flowdesign/src/main/resources/application-dev.yml b/blade-ops/blade-flowdesign/src/main/resources/application-dev.yml index 81746263..41d85e08 100644 --- a/blade-ops/blade-flowdesign/src/main/resources/application-dev.yml +++ b/blade-ops/blade-flowdesign/src/main/resources/application-dev.yml @@ -1,16 +1,5 @@ #数据源配置 spring: - redis: - ##redis 单机环境配置 - host: 127.0.0.1 - port: 6379 - password: - database: 0 - ssl: false - ##redis 集群环境配置 - #cluster: - # nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003 - # commandTimeout: 5000 datasource: url: jdbc:mysql://localhost:3306/bladex-flow?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true username: root diff --git a/blade-ops/blade-flowdesign/src/main/resources/application-prod.yml b/blade-ops/blade-flowdesign/src/main/resources/application-prod.yml new file mode 100644 index 00000000..41d85e08 --- /dev/null +++ b/blade-ops/blade-flowdesign/src/main/resources/application-prod.yml @@ -0,0 +1,7 @@ +#数据源配置 +spring: + datasource: + url: jdbc:mysql://localhost:3306/bladex-flow?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true + username: root + password: root + driver-class-name: com.mysql.cj.jdbc.Driver diff --git a/blade-ops/blade-flowdesign/src/main/resources/application-test.yml b/blade-ops/blade-flowdesign/src/main/resources/application-test.yml index 81746263..41d85e08 100644 --- a/blade-ops/blade-flowdesign/src/main/resources/application-test.yml +++ b/blade-ops/blade-flowdesign/src/main/resources/application-test.yml @@ -1,16 +1,5 @@ #数据源配置 spring: - redis: - ##redis 单机环境配置 - host: 127.0.0.1 - port: 6379 - password: - database: 0 - ssl: false - ##redis 集群环境配置 - #cluster: - # nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003 - # commandTimeout: 5000 datasource: url: jdbc:mysql://localhost:3306/bladex-flow?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true username: root diff --git a/blade-ops/blade-flowdesign/src/main/resources/application.yml b/blade-ops/blade-flowdesign/src/main/resources/application.yml index 91faf4fb..12e349f2 100644 --- a/blade-ops/blade-flowdesign/src/main/resources/application.yml +++ b/blade-ops/blade-flowdesign/src/main/resources/application.yml @@ -2,10 +2,6 @@ server: port: 9999 spring: - application: - name: blade-flowdesign - profiles: - active: test thymeleaf: cache: false mode: LEGACYHTML5