去掉pms之前遗留东西

This commit is contained in:
黄晓 2020-10-15 23:59:52 +08:00
parent 08d0bb91c3
commit 830ea83dfa
14 changed files with 22 additions and 193 deletions

View File

@ -1,3 +1,2 @@
**公司项目管理系统筹建群CW** boot 基础模板
**相关文档**

View File

@ -1,17 +0,0 @@
<increpack>
<!--GIT服务器配置-->
<git>
<url>http://47.107.61.133:3000/chinaweal/youfool-increpack.git</url>
<localRepo>D:\chinaweal\gitea-code\youfool-pms</localRepo> <!-- 工程文件所在地址(.git所在目录 -->
<fromCommit>8c7ff00218565019ad898b25158ef397170b6432</fromCommit> <!-- 起始的版本号, SHA-1码 -->
<untilCommit>054e33b95fa75511dc2efb26ddc781e8ffd21356</untilCommit> <!-- 截止的版本号, SHA-1码可以不配置默认取至最新版本 -->
</git>
<!-- 本地化配置文件,不用打包,以手工操作的方式进行升级 -->
<exclude>
<file>src\main\resources\application.yml</file>
<file>src\main\resources\application-dev.yml</file>
<file>src\main\resources\application-prod.yml</file>
<file>src\main\resources\logback-spring.xml</file>
<file>src\main\resources\properties\codeCenerator.properties</file>
</exclude>
</increpack>

55
pom.xml
View File

@ -46,33 +46,18 @@
<artifactId>druid-spring-boot-starter</artifactId> <artifactId>druid-spring-boot-starter</artifactId>
<version>1.1.21</version> <version>1.1.21</version>
</dependency> </dependency>
<!--easyexcel-->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>${easyexcel.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.projectlombok</groupId> <groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
<version>1.18.12</version> <version>1.18.12</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.12</version> <version>4.12</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>com.chinaweal.youfool</groupId>
<artifactId>youfool-increpack-maven-plugin-git</artifactId>
<version>1.0.1-SNAPSHOT</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
@ -81,46 +66,6 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
</plugin> </plugin>
<!-- 增量打包插件 -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>com.chinaweal.youfool.increpack.maven.IncrePackMain</mainClass>
<arguments>
<argument>${project.version}</argument>
</arguments>
<cleanupDaemonThreads>false</cleanupDaemonThreads>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<descriptors>
<descriptor>target/assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- 代码风格检测插件 checkstyle --> <!-- 代码风格检测插件 checkstyle -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>

View File

@ -20,28 +20,24 @@ import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import javax.sql.DataSource; import javax.sql.DataSource;
/** /**
* pms系统的数据源 * 系统的数据源
*
* @author itluck
*/ */
//@Configuration @Configuration
//@MapperScan(basePackages = {"com.chinaweal.youfool.pms.base.**.mapper", @MapperScan(basePackages = {"com.chinaweal.youfool.prj.**.mapper"}, sqlSessionTemplateRef = "prjSqlSessionTemplate")
// "com.chinaweal.youfool.pms.org.**.mapper", "com.chinaweal.youfool.pms.resource.**.mapper", public class PrjDataSource {
// "com.chinaweal.youfool.pms.project.**.mapper"}, sqlSessionTemplateRef = "pmsSqlSessionTemplate")
public class PmsDataSource {
@Bean(name = "pmsDS", initMethod = "init", destroyMethod = "close") @Bean(name = "prjDS", initMethod = "init", destroyMethod = "close")
@ConfigurationProperties(prefix = "spring.datasource.pms") @ConfigurationProperties(prefix = "spring.datasource.prj")
@Primary @Primary
public DruidDataSource dataSource() { public DruidDataSource dataSource() {
return DruidDataSourceBuilder.create().build(); return DruidDataSourceBuilder.create().build();
} }
@Bean(name = "pmsSqlSessionFactory") @Bean(name = "prjSqlSessionFactory")
@Primary @Primary
public MybatisSqlSessionFactoryBean sqlSessionFactory(@Qualifier("pmsDS") DataSource dataSource) throws Exception { public MybatisSqlSessionFactoryBean sqlSessionFactory(@Qualifier("prjDS") DataSource dataSource) throws Exception {
MybatisSqlSessionFactoryBean bean = new MybatisSqlSessionFactoryBean(); MybatisSqlSessionFactoryBean bean = new MybatisSqlSessionFactoryBean();
bean.setDataSource(dataSource); bean.setDataSource(dataSource);
GlobalConfig globalConfig = new GlobalConfig(); GlobalConfig globalConfig = new GlobalConfig();
@ -52,17 +48,17 @@ public class PmsDataSource {
return bean; return bean;
} }
@Bean(name = "pmsTransactionManager") @Bean(name = "prjTransactionManager")
@Primary @Primary
public DataSourceTransactionManager transactionManager(@Qualifier("pmsDS") DataSource dataSource) { public DataSourceTransactionManager transactionManager(@Qualifier("prjDS") DataSource dataSource) {
DataSourceTransactionManager dataSourceTransactionManager = new DataSourceTransactionManager(dataSource); DataSourceTransactionManager dataSourceTransactionManager = new DataSourceTransactionManager(dataSource);
dataSourceTransactionManager.setEnforceReadOnly(true); dataSourceTransactionManager.setEnforceReadOnly(true);
return dataSourceTransactionManager; return dataSourceTransactionManager;
} }
@Bean(name = "pmsSqlSessionTemplate") @Bean(name = "prjSqlSessionTemplate")
@Primary @Primary
public SqlSessionTemplate sqlSessionTemplate(@Qualifier("pmsSqlSessionFactory") SqlSessionFactory sqlSessionFactory) { public SqlSessionTemplate sqlSessionTemplate(@Qualifier("prjSqlSessionFactory") SqlSessionFactory sqlSessionFactory) {
return new SqlSessionTemplate(sqlSessionFactory); return new SqlSessionTemplate(sqlSessionFactory);
} }
} }

View File

@ -11,7 +11,7 @@ import org.springframework.stereotype.Component;
*/ */
@Component @Component
@Configuration @Configuration
@PropertySource(value = {"classpath:properties/youfool-pms.properties"}, encoding = "UTF-8") @PropertySource(value = {"classpath:properties/youfool-prj.properties"}, encoding = "UTF-8")
public class PropertySourceConfig { public class PropertySourceConfig {
@Bean @Bean
public PropertySourcesPlaceholderConfigurer propertySources() { public PropertySourcesPlaceholderConfigurer propertySources() {

View File

@ -34,6 +34,8 @@ public class ShiroConfig {
filterMap.put("jwtRestful", new JWTRestfulFilter()); filterMap.put("jwtRestful", new JWTRestfulFilter());
factoryBean.setFilters(filterMap); factoryBean.setFilters(filterMap);
Map<String, String> filterChainDefinitionMap = new LinkedHashMap<>(); Map<String, String> filterChainDefinitionMap = new LinkedHashMap<>();
filterChainDefinitionMap.put("/xxx==GET", "jwtRestful[org:dept:list]");
filterChainDefinitionMap.put("/**", "jwtRestful");
factoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap); factoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap);
return factoryBean; return factoryBean;
} }

View File

@ -19,9 +19,6 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
/**
* @author itluck
*/
@Configuration @Configuration
@EnableSwagger2 @EnableSwagger2
@EnableKnife4j @EnableKnife4j
@ -35,24 +32,6 @@ public class SwaggerKnife4j {
@Value("${license}") @Value("${license}")
private String license; private String license;
@Bean("orgApi")
public Docket orgApi() {
//添加head参数start
ParameterBuilder tokenPar = new ParameterBuilder();
List<Parameter> headers = new ArrayList<>();
tokenPar.name("token").description("令牌").modelRef(new ModelRef("string")).parameterType("header").required(false).build();
headers.add(tokenPar.build());
return new Docket(DocumentationType.SWAGGER_2)
.enable(true)
.apiInfo(apiInfo())
.groupName("组织架构")
.select()
.apis(RequestHandlerSelectors.basePackage("com.chinaweal.youfool.pms.org"))
.paths(PathSelectors.any())
.build()
.globalOperationParameters(headers);
}
@Bean("youfool") @Bean("youfool")
public Docket youfoolApi() { public Docket youfoolApi() {
//添加head参数start //添加head参数start
@ -66,41 +45,6 @@ public class SwaggerKnife4j {
.build(); .build();
} }
@Bean("projectApi")
public Docket projectApi() {
ParameterBuilder tokenPar = new ParameterBuilder();
List<Parameter> headers = new ArrayList<>();
tokenPar.name("token").description("令牌").modelRef(new ModelRef("string")).parameterType("header").required(false).build();
headers.add(tokenPar.build());
return new Docket(DocumentationType.SWAGGER_2)
.enable(true)
.apiInfo(apiInfo())
.groupName("项目管理")
.select()
.apis(RequestHandlerSelectors.basePackage("com.chinaweal.youfool.pms.project"))
.paths(PathSelectors.any())
.build()
.globalOperationParameters(headers);
}
@Bean("resourceApi")
public Docket resourceApi() {
//添加head参数start
ParameterBuilder tokenPar = new ParameterBuilder();
List<Parameter> headers = new ArrayList<>();
tokenPar.name("token").description("令牌").modelRef(new ModelRef("string")).parameterType("header").required(false).build();
headers.add(tokenPar.build());
return new Docket(DocumentationType.SWAGGER_2)
.enable(true)
.apiInfo(apiInfo())
.groupName("资源管理")
.select()
.apis(RequestHandlerSelectors.basePackage("com.chinaweal.youfool.pms.resource"))
.paths(PathSelectors.any())
.build()
.globalOperationParameters(headers);
}
private ApiInfo apiInfo() { private ApiInfo apiInfo() {
return new ApiInfoBuilder() return new ApiInfoBuilder()

View File

@ -20,8 +20,6 @@ import javax.sql.DataSource;
/** /**
* youfool基础的数据源 * youfool基础的数据源
*
* @author itluck
*/ */
@Configuration @Configuration

View File

@ -6,7 +6,7 @@ logging:
com.chinaweal.youfool.prj: debug com.chinaweal.youfool.prj: debug
spring: spring:
datasource: datasource:
pms: prj:
url: jdbc:postgresql://172.22.80.157:5432/pms_dev url: jdbc:postgresql://172.22.80.157:5432/pms_dev
username: postgres username: postgres
password: 123456 password: 123456

View File

@ -7,7 +7,7 @@ logging:
filePath: D:\project\pms\logs filePath: D:\project\pms\logs
spring: spring:
datasource: datasource:
pms: prj:
url: jdbc:postgresql://127.0.0.1:5432/pms url: jdbc:postgresql://127.0.0.1:5432/pms
username: postgres username: postgres
password: 123456 password: 123456

View File

@ -9,7 +9,7 @@ spring:
datasource: datasource:
#https://gitee.com/wenshao/druid/tree/master/druid-spring-boot-starter #https://gitee.com/wenshao/druid/tree/master/druid-spring-boot-starter
#https://github.com/alibaba/druid/wiki/DruidDataSource%E9%85%8D%E7%BD%AE #https://github.com/alibaba/druid/wiki/DruidDataSource%E9%85%8D%E7%BD%AE
pms: prj:
filters: stat filters: stat
initial-size: 2 initial-size: 2
min-idle: 1 min-idle: 1

View File

@ -5,7 +5,7 @@
<property name="filePattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %X{traceRootId} %5level %F%L - %msg%n"/> <property name="filePattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %X{traceRootId} %5level %F%L - %msg%n"/>
<property name="consolePattern" value="%d{HH:mm:ss.SSS} %X{traceRootId} %5level %F%L - %msg%n"/> <property name="consolePattern" value="%d{HH:mm:ss.SSS} %X{traceRootId} %5level %F%L - %msg%n"/>
<property name="logFilePath" value="${logFilePath}/"/> <property name="logFilePath" value="${logFilePath}/"/>
<property name="logFileName" value="prj-springboot-template"/> <property name="logFileName" value="prj"/>
<!--控制台输出日志--> <!--控制台输出日志-->
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">

View File

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" id="Definitions_0uw3uh5" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="2.2.4">
<bpmn:process id="Process_1" isExecutable="true">
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>SequenceFlow_0t0thg0</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:task id="Task_0w1flg1" name="Do_Something">
<bpmn:incoming>SequenceFlow_0t0thg0</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_09qk1yb</bpmn:outgoing>
</bpmn:task>
<bpmn:sequenceFlow id="SequenceFlow_0t0thg0" sourceRef="StartEvent_1" targetRef="Task_0w1flg1" />
<bpmn:endEvent id="EndEvent_1o6qfqs">
<bpmn:incoming>SequenceFlow_09qk1yb</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="SequenceFlow_09qk1yb" sourceRef="Task_0w1flg1" targetRef="EndEvent_1o6qfqs" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="173" y="102" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_0w1flg1_di" bpmnElement="Task_0w1flg1">
<dc:Bounds x="259" y="80" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0t0thg0_di" bpmnElement="SequenceFlow_0t0thg0">
<di:waypoint x="209" y="120" />
<di:waypoint x="259" y="120" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="EndEvent_1o6qfqs_di" bpmnElement="EndEvent_1o6qfqs">
<dc:Bounds x="409" y="102" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_09qk1yb_di" bpmnElement="SequenceFlow_09qk1yb">
<di:waypoint x="359" y="120" />
<di:waypoint x="409" y="120" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>

View File

@ -1,6 +1,6 @@
applicationName=pms applicationName=prj
#描述 #描述
description=建设工地管理系统 description=web应用后台模板
#许可 #许可
license=众望通科技 license=众望通科技
#版本号 #版本号