diff --git a/README.md b/README.md index f62e9bb3..d0e9108a 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,6 @@ |skyeye-rmprogram |8089 |小程序设计器模块 |rmprogram-web.jar | |skyeye-knowlg |8090 |知识库模块 |knowlg-web.jar | |skyeye-disk-cloud |8092 |云盘模块 |disk-cloud-web.jar | -|skyeye-business-flow |8094 |业务流程模块 |business-flow-web.jar | |skyeye-notice |8096 |公告模块 |notice-web.jar | |skyeye-forum |8097 |论坛模块 |forum-web.jar | |skyeye-jobdiary |8098 |工作日报模块 |jobdiary-web.jar | diff --git a/skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/controller/PlanProjectController.java b/skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/controller/PlanProjectController.java similarity index 97% rename from skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/controller/PlanProjectController.java rename to skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/controller/PlanProjectController.java index c54e1e8e..a51c2ffe 100644 --- a/skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/controller/PlanProjectController.java +++ b/skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/controller/PlanProjectController.java @@ -2,7 +2,7 @@ * Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye ******************************************************************************/ -package com.skyeye.eve.controller; +package com.skyeye.eve.businessflow.controller; import com.skyeye.annotation.api.Api; import com.skyeye.annotation.api.ApiImplicitParam; @@ -10,7 +10,7 @@ import com.skyeye.annotation.api.ApiImplicitParams; import com.skyeye.annotation.api.ApiOperation; import com.skyeye.common.object.InputObject; import com.skyeye.common.object.OutputObject; -import com.skyeye.eve.service.PlanProjectService; +import com.skyeye.eve.businessflow.service.PlanProjectService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; diff --git a/skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/controller/PlanProjectFlowController.java b/skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/controller/PlanProjectFlowController.java similarity index 97% rename from skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/controller/PlanProjectFlowController.java rename to skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/controller/PlanProjectFlowController.java index b3829a8f..e31f7553 100644 --- a/skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/controller/PlanProjectFlowController.java +++ b/skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/controller/PlanProjectFlowController.java @@ -2,11 +2,11 @@ * Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye ******************************************************************************/ -package com.skyeye.eve.controller; +package com.skyeye.eve.businessflow.controller; import com.skyeye.common.object.InputObject; import com.skyeye.common.object.OutputObject; -import com.skyeye.eve.service.PlanProjectFlowService; +import com.skyeye.eve.businessflow.service.PlanProjectFlowService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; diff --git a/skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/dao/PlanProjectDao.java b/skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/dao/PlanProjectDao.java similarity index 95% rename from skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/dao/PlanProjectDao.java rename to skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/dao/PlanProjectDao.java index 0594fb46..50b31adb 100644 --- a/skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/dao/PlanProjectDao.java +++ b/skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/dao/PlanProjectDao.java @@ -2,7 +2,7 @@ * Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye ******************************************************************************/ -package com.skyeye.eve.dao; +package com.skyeye.eve.businessflow.dao; import java.util.List; import java.util.Map; diff --git a/skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/dao/PlanProjectFlowDao.java b/skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/dao/PlanProjectFlowDao.java similarity index 96% rename from skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/dao/PlanProjectFlowDao.java rename to skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/dao/PlanProjectFlowDao.java index 04e798b1..b74da062 100644 --- a/skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/dao/PlanProjectFlowDao.java +++ b/skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/dao/PlanProjectFlowDao.java @@ -2,7 +2,7 @@ * Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye ******************************************************************************/ -package com.skyeye.eve.dao; +package com.skyeye.eve.businessflow.dao; import java.util.List; import java.util.Map; diff --git a/skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/service/PlanProjectFlowService.java b/skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/service/PlanProjectFlowService.java similarity index 96% rename from skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/service/PlanProjectFlowService.java rename to skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/service/PlanProjectFlowService.java index 5fa69467..b1e5104e 100644 --- a/skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/service/PlanProjectFlowService.java +++ b/skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/service/PlanProjectFlowService.java @@ -2,7 +2,7 @@ * Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye ******************************************************************************/ -package com.skyeye.eve.service; +package com.skyeye.eve.businessflow.service; import com.skyeye.common.object.InputObject; import com.skyeye.common.object.OutputObject; diff --git a/skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/service/PlanProjectService.java b/skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/service/PlanProjectService.java similarity index 95% rename from skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/service/PlanProjectService.java rename to skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/service/PlanProjectService.java index 36248b58..a7cfd831 100644 --- a/skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/service/PlanProjectService.java +++ b/skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/service/PlanProjectService.java @@ -2,7 +2,7 @@ * Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye ******************************************************************************/ -package com.skyeye.eve.service; +package com.skyeye.eve.businessflow.service; import com.skyeye.common.object.InputObject; import com.skyeye.common.object.OutputObject; diff --git a/skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/service/impl/PlanProjectFlowServiceImpl.java b/skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/service/impl/PlanProjectFlowServiceImpl.java similarity index 97% rename from skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/service/impl/PlanProjectFlowServiceImpl.java rename to skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/service/impl/PlanProjectFlowServiceImpl.java index 1093c388..767ca1fb 100644 --- a/skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/service/impl/PlanProjectFlowServiceImpl.java +++ b/skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/service/impl/PlanProjectFlowServiceImpl.java @@ -2,13 +2,13 @@ * Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye ******************************************************************************/ -package com.skyeye.eve.service.impl; +package com.skyeye.eve.businessflow.service.impl; import com.skyeye.common.object.InputObject; import com.skyeye.common.object.OutputObject; import com.skyeye.common.util.DataCommonUtil; -import com.skyeye.eve.dao.PlanProjectFlowDao; -import com.skyeye.eve.service.PlanProjectFlowService; +import com.skyeye.eve.businessflow.dao.PlanProjectFlowDao; +import com.skyeye.eve.businessflow.service.PlanProjectFlowService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/service/impl/PlanProjectServiceImpl.java b/skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/service/impl/PlanProjectServiceImpl.java similarity index 96% rename from skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/service/impl/PlanProjectServiceImpl.java rename to skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/service/impl/PlanProjectServiceImpl.java index 5b33c731..1aa74ed2 100644 --- a/skyeye-business-flow/business-flow-pro/src/main/java/com/skyeye/eve/service/impl/PlanProjectServiceImpl.java +++ b/skyeye-adm/adm-pro/src/main/java/com/skyeye/eve/businessflow/service/impl/PlanProjectServiceImpl.java @@ -2,7 +2,7 @@ * Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye ******************************************************************************/ -package com.skyeye.eve.service.impl; +package com.skyeye.eve.businessflow.service.impl; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; @@ -10,9 +10,9 @@ import com.skyeye.common.object.InputObject; import com.skyeye.common.object.OutputObject; import com.skyeye.common.util.DataCommonUtil; import com.skyeye.common.util.DateUtil; -import com.skyeye.eve.dao.PlanProjectDao; +import com.skyeye.eve.businessflow.dao.PlanProjectDao; import com.skyeye.eve.service.IAuthUserService; -import com.skyeye.eve.service.PlanProjectService; +import com.skyeye.eve.businessflow.service.PlanProjectService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/skyeye-business-flow/business-flow-pro/src/main/resources/mapper/planpro/PlanProjectFlowMapper.xml b/skyeye-adm/adm-pro/src/main/resources/mapper/planpro/PlanProjectFlowMapper.xml similarity index 97% rename from skyeye-business-flow/business-flow-pro/src/main/resources/mapper/planpro/PlanProjectFlowMapper.xml rename to skyeye-adm/adm-pro/src/main/resources/mapper/planpro/PlanProjectFlowMapper.xml index d33429fd..03556a8a 100644 --- a/skyeye-business-flow/business-flow-pro/src/main/resources/mapper/planpro/PlanProjectFlowMapper.xml +++ b/skyeye-adm/adm-pro/src/main/resources/mapper/planpro/PlanProjectFlowMapper.xml @@ -1,6 +1,6 @@ - + SELECT diff --git a/skyeye-business-flow/business-flow-pro/src/main/resources/reqmapping/mapping/planpro.xml b/skyeye-adm/adm-pro/src/main/resources/reqmapping/mapping/planpro.xml similarity index 100% rename from skyeye-business-flow/business-flow-pro/src/main/resources/reqmapping/mapping/planpro.xml rename to skyeye-adm/adm-pro/src/main/resources/reqmapping/mapping/planpro.xml diff --git a/skyeye-adm/adm-web/src/main/java/com/skyeye/db/config/BaseDataSourceConfig.java b/skyeye-adm/adm-web/src/main/java/com/skyeye/db/config/BaseDataSourceConfig.java index 7d96225e..72c73c4b 100644 --- a/skyeye-adm/adm-web/src/main/java/com/skyeye/db/config/BaseDataSourceConfig.java +++ b/skyeye-adm/adm-web/src/main/java/com/skyeye/db/config/BaseDataSourceConfig.java @@ -39,7 +39,6 @@ import java.util.Properties; @Configuration @MapperScan(basePackages = { - "com.skyeye.eve.*.dao", "com.skyeye.eve.*.dao"}, sqlSessionFactoryRef = "baseSqlSessionFactory") public class BaseDataSourceConfig { diff --git a/skyeye-business-flow/.gitignore b/skyeye-business-flow/.gitignore deleted file mode 100644 index b501cc26..00000000 --- a/skyeye-business-flow/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -*.class - -# Package Files # -*.war -*.ear - -class -.idea -*.iml -.settings -*.classpath -/bin -/images/ -classes -/target/ -/.project/ -/.metadata/ -/logs/ \ No newline at end of file diff --git a/skyeye-business-flow/business-flow-common/.gitignore b/skyeye-business-flow/business-flow-common/.gitignore deleted file mode 100644 index b501cc26..00000000 --- a/skyeye-business-flow/business-flow-common/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -*.class - -# Package Files # -*.war -*.ear - -class -.idea -*.iml -.settings -*.classpath -/bin -/images/ -classes -/target/ -/.project/ -/.metadata/ -/logs/ \ No newline at end of file diff --git a/skyeye-business-flow/business-flow-common/pom.xml b/skyeye-business-flow/business-flow-common/pom.xml deleted file mode 100644 index 2ea6e60b..00000000 --- a/skyeye-business-flow/business-flow-common/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - skyeye-business-flow - com.skyeye - 1.0-SNAPSHOT - - 4.0.0 - - business-flow-common - - - - - - com.skyeye - skyeye-common-rest - 1.0-SNAPSHOT - - - - - \ No newline at end of file diff --git a/skyeye-business-flow/business-flow-entity/.gitignore b/skyeye-business-flow/business-flow-entity/.gitignore deleted file mode 100644 index b501cc26..00000000 --- a/skyeye-business-flow/business-flow-entity/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -*.class - -# Package Files # -*.war -*.ear - -class -.idea -*.iml -.settings -*.classpath -/bin -/images/ -classes -/target/ -/.project/ -/.metadata/ -/logs/ \ No newline at end of file diff --git a/skyeye-business-flow/business-flow-entity/pom.xml b/skyeye-business-flow/business-flow-entity/pom.xml deleted file mode 100644 index 87578f92..00000000 --- a/skyeye-business-flow/business-flow-entity/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - skyeye-business-flow - com.skyeye - 1.0-SNAPSHOT - - 4.0.0 - - business-flow-entity - - - - - com.skyeye - business-flow-common - 1.0-SNAPSHOT - - - - - \ No newline at end of file diff --git a/skyeye-business-flow/business-flow-pro/.gitignore b/skyeye-business-flow/business-flow-pro/.gitignore deleted file mode 100644 index b501cc26..00000000 --- a/skyeye-business-flow/business-flow-pro/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -*.class - -# Package Files # -*.war -*.ear - -class -.idea -*.iml -.settings -*.classpath -/bin -/images/ -classes -/target/ -/.project/ -/.metadata/ -/logs/ \ No newline at end of file diff --git a/skyeye-business-flow/business-flow-pro/pom.xml b/skyeye-business-flow/business-flow-pro/pom.xml deleted file mode 100644 index 1630cab4..00000000 --- a/skyeye-business-flow/business-flow-pro/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - skyeye-business-flow - com.skyeye - 1.0-SNAPSHOT - - 4.0.0 - - business-flow-pro - - - - - com.skyeye - business-flow-entity - 1.0-SNAPSHOT - - - - - \ No newline at end of file diff --git a/skyeye-business-flow/business-flow-web/.gitignore b/skyeye-business-flow/business-flow-web/.gitignore deleted file mode 100644 index b501cc26..00000000 --- a/skyeye-business-flow/business-flow-web/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -*.class - -# Package Files # -*.war -*.ear - -class -.idea -*.iml -.settings -*.classpath -/bin -/images/ -classes -/target/ -/.project/ -/.metadata/ -/logs/ \ No newline at end of file diff --git a/skyeye-business-flow/business-flow-web/pom.xml b/skyeye-business-flow/business-flow-web/pom.xml deleted file mode 100644 index 89fbe33c..00000000 --- a/skyeye-business-flow/business-flow-web/pom.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - skyeye-business-flow - com.skyeye - 1.0-SNAPSHOT - - 4.0.0 - - business-flow-web - - - 8 - 8 - - - - - - com.skyeye - business-flow-pro - 1.0-SNAPSHOT - - - - org.springframework.boot - spring-boot-starter-web-services - - - - - org.springframework.boot - spring-boot-starter-actuator - - - - de.codecentric - spring-boot-admin-starter-client - 2.0.3 - - - - org.jolokia - jolokia-core - - - - com.googlecode.json-simple - json-simple - - - - - - ${project.artifactId} - - - - org.apache.maven.plugins - maven-resources-plugin - - UTF-8 - - - - - - org.springframework.boot - spring-boot-maven-plugin - - true - - - - org.springframework - springloaded - 1.2.5.RELEASE - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.8 - 1.8 - UTF-8 - - - - - - \ No newline at end of file diff --git a/skyeye-business-flow/business-flow-web/src/main/java/com/SkyBusinessFlowApplication.java b/skyeye-business-flow/business-flow-web/src/main/java/com/SkyBusinessFlowApplication.java deleted file mode 100644 index 27d3ea75..00000000 --- a/skyeye-business-flow/business-flow-web/src/main/java/com/SkyBusinessFlowApplication.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye - ******************************************************************************/ - -package com; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.client.discovery.EnableDiscoveryClient; -import org.springframework.cloud.openfeign.EnableFeignClients; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.transaction.annotation.EnableTransactionManagement; - -@SpringBootApplication -@EnableAutoConfiguration(exclude = { - org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class -}) -@EnableTransactionManagement//启注解事务管理,等同于xml配置方式的 -@ComponentScan(basePackages = {"com.skyeye"}) -@EnableDiscoveryClient // 开启服务发现 -@EnableFeignClients -public class SkyBusinessFlowApplication { - - public static void main(String[] args) { - System.setProperty("spring.devtools.restart.enabled", "false"); - SpringApplication.run(SkyBusinessFlowApplication.class, args); - } - -} diff --git a/skyeye-business-flow/business-flow-web/src/main/java/com/skyeye/db/config/BaseDataSourceConfig.java b/skyeye-business-flow/business-flow-web/src/main/java/com/skyeye/db/config/BaseDataSourceConfig.java deleted file mode 100644 index 35c02f5e..00000000 --- a/skyeye-business-flow/business-flow-web/src/main/java/com/skyeye/db/config/BaseDataSourceConfig.java +++ /dev/null @@ -1,163 +0,0 @@ -/******************************************************************************* - * Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye - ******************************************************************************/ - -package com.skyeye.db.config; - -import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean; -import com.skyeye.common.constans.CommonConstants; -import com.skyeye.exception.CustomException; -import org.apache.commons.collections.CollectionUtils; -import org.apache.ibatis.session.SqlSessionFactory; -import org.mybatis.spring.SqlSessionTemplate; -import org.mybatis.spring.annotation.MapperScan; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.boot.jdbc.DataSourceBuilder; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Primary; -import org.springframework.core.io.Resource; -import org.springframework.core.io.ResourceLoader; -import org.springframework.core.io.support.PathMatchingResourcePatternResolver; -import org.springframework.core.io.support.ResourcePatternResolver; -import org.springframework.jdbc.datasource.DataSourceTransactionManager; -import org.springframework.transaction.PlatformTransactionManager; - -import javax.sql.DataSource; -import java.io.IOException; -import java.sql.Connection; -import java.sql.DatabaseMetaData; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Properties; - -@Configuration -@MapperScan(basePackages = { - "com.skyeye.eve.dao", - "com.skyeye.eve.*.dao"}, sqlSessionFactoryRef = "baseSqlSessionFactory") -public class BaseDataSourceConfig { - - private static final Logger LOGGER = LoggerFactory.getLogger(BaseDataSourceConfig.class); - - protected static Properties databaseTypeMappings = CommonConstants.getDefaultDatabaseTypeMappings(); - - @Autowired - protected ResourceLoader resourceLoader; - - /** - * Primary 必须加此注解,不然报错,下一个类则不需要添加,表示这个数据源是默认数据源 - * ConfigurationProperties(prefix)值必须是application.properteis中对应属性的前缀 - * - * @return - */ - @Bean(name = "baseDataSource") - @Primary - @ConfigurationProperties(prefix = "spring.datasource") - public DataSource baseDataSource() { - return DataSourceBuilder.create().build(); - } - - /** - * a、SqlSessionFactory 一旦被创建就应该在应用的运行期间一直存在,没有任何理由对它进行清除或重建。 - * b、使用 SqlSessionFactory 的最佳实践是在应用运行期间不要重复创建多次,多次重建 SqlSessionFactory 被视为一种代码“坏味道(bad smell)”。 - * c、因此 SqlSessionFactory 的最佳作用域是应用作用域。有很多方法可以做到,最简单的就是使用单例模式或者静态单例模式。 - * - * @param dataSource - * @return - */ - @Primary - @Bean(name = "baseSqlSessionFactory") - public SqlSessionFactory baseSqlSessionFactory(@Qualifier("baseDataSource") DataSource dataSource) { - MybatisSqlSessionFactoryBean mybatisSqlSessionFactoryBean = new MybatisSqlSessionFactoryBean(); - - mybatisSqlSessionFactoryBean.setDataSource(dataSource); - String databaseType = this.initDatabaseType(dataSource); - if (databaseType == null) { - throw new CustomException("couldn't deduct database type"); - } else { - try { - // 添加XML目录 - mybatisSqlSessionFactoryBean.setMapperLocations(resolveMapperLocations()); - mybatisSqlSessionFactoryBean.afterPropertiesSet(); - return mybatisSqlSessionFactoryBean.getObject(); - } catch (Exception var5) { - throw new CustomException("Could not create sqlSessionFactory", var5); - } - } - } - - public Resource[] resolveMapperLocations() { - ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver(); - List mapperLocations = new ArrayList<>(); - mapperLocations.add("classpath*:mapper/**/*.xml"); - List resources = new ArrayList(); - if (!CollectionUtils.isEmpty(mapperLocations)) { - for (String mapperLocation : mapperLocations) { - try { - Resource[] mappers = resourceResolver.getResources(mapperLocation); - resources.addAll(Arrays.asList(mappers)); - } catch (IOException e) { - LOGGER.error("Get myBatis resources happened exception", e); - } - } - } - return resources.toArray(new Resource[resources.size()]); - } - - @Primary - @Bean(name = "transactionManager") - public PlatformTransactionManager transactionManager(@Qualifier("baseDataSource") DataSource dataSourceOne) { - return new DataSourceTransactionManager(dataSourceOne); - } - - @Primary - @Bean(name = "sqlSessionTemplate") - public SqlSessionTemplate sqlSessionTemplate(@Qualifier("baseSqlSessionFactory") SqlSessionFactory sqlSessionFactory) { - // 使用上面配置的Factory - return new SqlSessionTemplate(sqlSessionFactory); - } - - /** - * 初始化 - * - * @param dataSource - * @return - */ - protected String initDatabaseType(@Qualifier("baseDataSource") DataSource dataSource) { - String databaseType = null; - Connection connection = null; - - try { - connection = dataSource.getConnection(); - DatabaseMetaData databaseMetaData = connection.getMetaData(); - String databaseProductName = databaseMetaData.getDatabaseProductName(); - LOGGER.info("database product name: '{}'", databaseProductName); - databaseType = databaseTypeMappings.getProperty(databaseProductName); - if (databaseType == null) { - throw new CustomException("couldn't deduct database type from database product name '" + databaseProductName + "'"); - } - - LOGGER.info("using database type: {}", databaseType); - } catch (SQLException var14) { - LOGGER.error("Exception while initializing Database connection", var14); - } finally { - try { - if (connection != null) { - connection.close(); - } - } catch (SQLException var13) { - LOGGER.error("Exception while closing the Database connection", var13); - } - - } - databaseType = ("dm".equals(databaseType)) ? "oracle" : databaseType; - return databaseType; - } - -} diff --git a/skyeye-business-flow/business-flow-web/src/main/resources/banner.txt b/skyeye-business-flow/business-flow-web/src/main/resources/banner.txt deleted file mode 100644 index 17456323..00000000 --- a/skyeye-business-flow/business-flow-web/src/main/resources/banner.txt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * _ooOoo_ - * o8888888o - * 88" . "88 - * (| -_- |) - * O\ = /O - * ____/`---'\____ - * .' \\| |// `. - * / \\||| : |||// \ - * / _||||| -:- |||||- \ - * | | \\\ - /// | | - * | \_| ''\---/'' | | - * \ .-\__ `-` ___/-. / - * ___`. .' /--.--\ `. . __ - * ."" '< `.___\_<|>_/___.' >'"". - * | | : `- \`.;`\ _ /`;.`/ - ` : | | - * \ \ `-. \_ __\ /__ _/ .-` / / - * ======`-.____`-.___\_____/___.-`____.-'====== - * `=---=' - * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - * 佛祖保佑 永无BUG - * 佛曰: - * 写字楼里写字间,写字间里程序员; - * 程序人员写程序,又拿程序换酒钱。 - * 酒醒只在网上坐,酒醉还来网下眠; - * 酒醉酒醒日复日,网上网下年复年。 - * 但愿老死电脑间,不愿鞠躬老板前; - * 奔驰宝马贵者趣,公交自行程序员。 - * 别人笑我忒疯癫,我笑自己命太贱; - * 不见满街漂亮妹,哪个归得程序员? - * :: springboot 2.x - * :: Skyeye系列框架,作者:卫志强 - * :: 作者独家专属,未购买禁止私自使用 - * 启动:nohup java -jar -Dspring.cloud.nacos.discovery.server-addr=localhost:9000 -Dspring.cloud.nacos.config.server-addr=localhost:9000 -Dspring.profiles.active=dev business-flow-web.jar >> /opt/service/project/nohup-business-flow.out 2>&1 & - * 清空日志:cat /dev/null > xxx-web.out -*/ \ No newline at end of file diff --git a/skyeye-business-flow/business-flow-web/src/main/resources/bootstrap.yml b/skyeye-business-flow/business-flow-web/src/main/resources/bootstrap.yml deleted file mode 100644 index 968b85d1..00000000 --- a/skyeye-business-flow/business-flow-web/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,37 +0,0 @@ -server: - port: 8094 - -spring: - application: - name: skyeye-business-flow-${spring.profiles.active} # 服务名 - profiles: - active: public - cloud: - nacos: - discovery: - server-addr: localhost:9000 # 配置服务注册nacos地址 - namespace: ${spring.profiles.active} # 配置命名空间 - service: ${spring.application.name} # 配置服务名 - config: - # 指定nacos server的地址 - server-addr: localhost:9000 - # 配置文件后缀 - file-extension: yml - # 命名空间 常用场景之一是不同环境的配置的区分隔离,例如开发测试环境和生产环境的资源(如配置、服务)隔离等 - namespace: ${spring.profiles.active} # 配置命名空间 - # 支持多个共享 Data Id 的配置,优先级小于ext-config,自定义 Data Id 配置 属性是个集合,内部由 Config POJO 组成。Config 有 3 个属性,分别是 dataId, group 以及 refresh - ext-config: - - data-id: skyeye-common.yml # 配置文件名-Data Id - group: DEFAULT_GROUP # 默认为DEFAULT_GROUP - refresh: false # 是否动态刷新,默认为false -logging: - level: - com.skyeye: debug - -feign: - client: - config: - # 全局配置 - default: - loggerLevel: FULL - diff --git a/skyeye-business-flow/business-flow-web/src/main/resources/jvm调优参数配置 b/skyeye-business-flow/business-flow-web/src/main/resources/jvm调优参数配置 deleted file mode 100644 index ccedd4b5..00000000 --- a/skyeye-business-flow/business-flow-web/src/main/resources/jvm调优参数配置 +++ /dev/null @@ -1,22 +0,0 @@ --- jvm堆的最小值3G --Xms3072m --- jvm堆的最大值3G --Xmx3072m --- 新生代内存区域的大小,设置新生代区域后,老年代内存=堆内存 - 新生代内存;老年代的最大内存 = 堆内存 - 新生代最大内存 --Xmn2048M --- 新生代内存区域中Eden和Survivor的比例,SurvivorRatio=8,那么Eden区占8/10,2个Survivor区各占1/10 --XX:SurvivorRatio=8 --- 大小为区间为[0,15],如果高于15,JDK7 会默认15,JDK 8会启动报错 --XX:MaxTenuringThreshold=15 --- 输出GC的时间戳(以日期的形式,如 2019-05-04T21:53:59.234+0800) --XX:+PrintGCDateStamps --- 打印出GC的详细信息 --XX:+PrintGCDetails --- 在进行GC的前后打印出堆的信息 --XX:+PrintHeapAtGC --- 打印年轻代各个引用的数量以及时长 --XX:+PrintReferenceGC --- 开启gc日志 --verbose:gc --- gc日志的存放位置 --Xloggc:d:/gc.log diff --git a/skyeye-business-flow/business-flow-web/src/main/resources/log4j.properties b/skyeye-business-flow/business-flow-web/src/main/resources/log4j.properties deleted file mode 100644 index 03115ffd..00000000 --- a/skyeye-business-flow/business-flow-web/src/main/resources/log4j.properties +++ /dev/null @@ -1,53 +0,0 @@ -### set log levels这里的INFO,Stdout,D,E可以理解为变量,也可以说是输出平台,在下面我们可以看到 ### -log4j.rootLogger = INFO, C, D, E - -### console控制台输出 ### -log4j.appender.C = org.apache.log4j.ConsoleAppender -### System.out也就是输出 out输出是黑色字体,err输出的字体是红色 ### -log4j.appender.C.Target = System.out -### layout是指布局,也就是说输出日志信息的格式样式,在这里我们使用的是log4j提供的 ### -log4j.appender.C.layout = org.apache.log4j.PatternLayout -### 这里就是指定我们日志文件以哪一种格式去输出 ### -log4j.appender.C.layout.ConversionPattern = [skyeye-promote][%p] [%-d{yyyy-MM-dd HH:mm:ss}] %C.%M(%L) | %m%n - - -### log file INFO级别输出日志文件 ### -log4j.appender.D = org.apache.log4j.DailyRollingFileAppender -### 指定日志输出位置 ### -log4j.appender.D.File = ../logs/skyeye.log -### 这个的意思是指是追加还是覆盖 默认是 true true是追加 false是覆盖 ### -log4j.appender.D.Append = true -### 这个是指日志输出的级别在这里指定的是 INFO级别 ### -log4j.appender.D.Threshold = INFO -### layout是指布局,也就是说输出日志信息的格式样式,在这里我们使用的是log4j提供的 ### -log4j.appender.D.layout = org.apache.log4j.PatternLayout -### 这里就是指定我们日志文件以哪一种格式去输出 ### -log4j.appender.D.layout.ConversionPattern = [skyeye-promote][%p] [%-d{yyyy-MM-dd HH:mm:ss}] %C.%M(%L) | %m%n - - -### exception ERROR级别输出日志文件 ### -#这个跟上面一样 只不过是日志级别是 ERROR级的,方便我们直接查看系统异常信息 -log4j.appender.E = org.apache.log4j.DailyRollingFileAppender -log4j.appender.E.File = ../logs/skyeye_error.log -log4j.appender.E.Append = true -log4j.appender.E.Threshold = ERROR -log4j.appender.E.layout = org.apache.log4j.PatternLayout -log4j.appender.E.layout.ConversionPattern = [skyeye-promote][%p] [%-d{yyyy-MM-dd HH:mm:ss}] %C.%M(%L) | %m%n - -#localhost日志文件输出级别为INFO -org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO -#localhost日志文件输出处理类2localhost.org.apache.juli.FileHandler -org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler - -#manager日志文件输出级别为INFO -org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO -#manager日志文件输出处理类3manager.org.apache.juli.FileHandler -org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler - -#host-manager日志文件输出级别为INFO -org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO -#host-manager日志文件输出处理类4host-manager.org.apache.juli.FileHandler -org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler - -#设置包名的输出级别 -log4j.logger.com.skyeye.common.filter=info diff --git a/skyeye-business-flow/pom.xml b/skyeye-business-flow/pom.xml deleted file mode 100644 index 750e83a1..00000000 --- a/skyeye-business-flow/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - 4.0.0 - pom - - business-flow-common - business-flow-entity - business-flow-pro - business-flow-web - - - - com.skyeye - skyeye-parent - 1.0-SNAPSHOT - - - com.skyeye - skyeye-business-flow - 1.0-SNAPSHOT - - \ No newline at end of file