Commit 5fc0b07f authored by xfxmcy's avatar xfxmcy

v1.1 升级springboot2.0 & activiti

parent 5893a7bb
...@@ -6,22 +6,37 @@ ...@@ -6,22 +6,37 @@
<groupId>org.rcisoft</groupId> <groupId>org.rcisoft</groupId>
<artifactId>91isoft_spbt_project</artifactId> <artifactId>91isoft_spbt_project</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.1</version>
<description> 91isoft_spbt_project </description> <description>91isoft_spbt_project</description>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<spring.boot.version>1.5.3.RELEASE</spring.boot.version> <spring.boot.version>2.0.1.RELEASE</spring.boot.version>
<activiti.version>5.22.0</activiti.version>
</properties> </properties>
<dependencyManagement>
<dependencies>
<dependency>
<!--mvn 单继承 可以使用 spring-boot-dependencies 代替 parent-->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.91isoft</groupId> <groupId>org.91isoft</groupId>
<artifactId>91isoft_spbt</artifactId> <artifactId>91isoft_spbt</artifactId>
<version>1.0.1-SNAPSHOT</version> <version>2.0.2</version>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
......
...@@ -127,9 +127,10 @@ cy: ...@@ -127,9 +127,10 @@ cy:
redis: false #是否开启redis缓存 redis: false #是否开启redis缓存
DecryptParam: false #参数加密验证 DecryptParam: false #参数加密验证
CySwagger2Config: true CySwagger2Config: true
activiti: true
#Security 配置 #Security 配置
security: security:
permitAll: permit-all:
permitUnStatic: #允许用户访问的地址(路径) permitUnStatic: #允许用户访问的地址(路径)
- "/static/**" - "/static/**"
- "/webjars/**" - "/webjars/**"
...@@ -190,6 +191,8 @@ http://localhost:8084/swagger-ui.html#/ 访问swaggerUI ...@@ -190,6 +191,8 @@ http://localhost:8084/swagger-ui.html#/ 访问swaggerUI
| v1.0 | logback | 日志 | cy | | v1.0 | logback | 日志 | cy |
| v1.0 | jwt | json web token 身份验证 | cy | | v1.0 | jwt | json web token 身份验证 | cy |
| v1.0 | spring-security | 安全性框架 | cy | | v1.0 | spring-security | 安全性框架 | cy |
| v2.0 | springboot2 | springboot2.0升级 | cy |
| v2.0 | activiti | 工作流引擎 | cy |
### 编码规范 ### 编码规范
...@@ -248,6 +251,7 @@ ${basedir}/sql ...@@ -248,6 +251,7 @@ ${basedir}/sql
| v1.0 | swagger2 | 文档 | 开启 | 是 | | v1.0 | swagger2 | 文档 | 开启 | 是 |
| v1.0 | multipleDs | 多数据源 | 关闭 | 是 | | v1.0 | multipleDs | 多数据源 | 关闭 | 是 |
| v1.0 | dbLod | 数据库日志 | 关闭 | 是 | | v1.0 | dbLod | 数据库日志 | 关闭 | 是 |
| v2.0 | activiti | 工作流 | 关闭 | 是 |
### pageUtil ### pageUtil
...@@ -303,6 +307,12 @@ ${basedir}/sql ...@@ -303,6 +307,12 @@ ${basedir}/sql
## seurity(权限) ## seurity(权限)
#### `application-dev.yml`中`cy.model.security` 下相关配置 #### `application-dev.yml`中`cy.model.security` 下相关配置
1. 目前是登陆后才可访问其他接口 1. 目前是登陆后才可访问其他接口
2. 开启所有接口的直接访问:`cy.model.security.permitUnStatic` 下加` - "*/**" `即可 2. 开启所有接口的直接访问:`cy.model.security.permitUnStatic` 下加` - "*/**" `即可
### activiti
#### `application-dev.yml`中`cy.model.activiti` 下相关配置
`activiti: false` 改为 `activiti: true`,流程设计器 `http://localhost:8084/static/explorer/modeler.html?modelId=50` 50替换为模型id
\ No newline at end of file
...@@ -5,6 +5,7 @@ import org.springframework.boot.SpringApplication; ...@@ -5,6 +5,7 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.ImportResource;
import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.EnableTransactionManagement;
...@@ -20,7 +21,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; ...@@ -20,7 +21,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableSwagger2 @EnableSwagger2
@EnableScheduling @EnableScheduling
@EnableGlobalMethodSecurity(prePostEnabled=true) @EnableGlobalMethodSecurity(prePostEnabled=true)
@MapperScan(basePackages = "org.rcisoft.**.dao")//扫描dao 不需要@repository @MapperScan(basePackages = {"org.rcisoft.**.dao","org.activiti.dao"})//扫描dao 不需要@repository
public class ProjectApplication { public class ProjectApplication {
public static void main(String[] args) { public static void main(String[] args) {
......
server: server:
port: 8084 port: 8084
context-path: / #ContextPath must start with '/' and not end with '/'
tomcat: tomcat:
max-threads: 300 max-threads: 300
servlet:
context-path: /
session:
timeout: PT480M
#uri-encoding: UTF-8 #uri-encoding: UTF-8
# ssl: # ssl:
# key-store: classpath:client1.p12 # key-store: classpath:client1.p12
...@@ -16,9 +19,9 @@ server: ...@@ -16,9 +19,9 @@ server:
# org.springframework.web: DEBUG # org.springframework.web: DEBUG
druid: druid:
url: jdbc:mysql://127.0.0.1:3306/mall4?useUnicode=true&characterEncoding=UTF-8&useSSL=false&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true url: jdbc:mysql://127.0.0.1:3306/mall?useUnicode=true&characterEncoding=UTF-8&useSSL=false&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true
username: root username: root
password: 123456 password: cy
initial-size: 1 initial-size: 1
min-idle: 1 min-idle: 1
max-active: 20 max-active: 20
...@@ -62,13 +65,6 @@ pagehelper: ...@@ -62,13 +65,6 @@ pagehelper:
spring: spring:
jackson:
default-property-inclusion: non_null
#http:
# encoding:
# force: true
# charset: UTF-8
# enabled: true
multipart: multipart:
max-file-size: 100Mb max-file-size: 100Mb
max-request-size: 1000Mb max-request-size: 1000Mb
...@@ -119,8 +115,9 @@ cy: ...@@ -119,8 +115,9 @@ cy:
entityParam: true entityParam: true
decryptParam: false decryptParam: false
swagger2Config: true swagger2Config: true
activiti: false
security: security:
permitAll: permit-all:
permitUnStatic: permitUnStatic:
- "/static/**" - "/static/**"
- "/webjars/**" - "/webjars/**"
...@@ -131,7 +128,7 @@ cy: ...@@ -131,7 +128,7 @@ cy:
- "/code/**/**" - "/code/**/**"
- "/excelUtil/**" - "/excelUtil/**"
- "/cros/**" - "/cros/**"
# - "*/**" - "/**/**"
permitStatic: ["/", "/*.html", "/favicon.ico", "/**/*.html", "/**/*.js", "/**/*.css"] permitStatic: ["/", "/*.html", "/favicon.ico", "/**/*.html", "/**/*.js", "/**/*.css"]
logoutSuccessUrl: "/login" logoutSuccessUrl: "/login"
loginPage: "/login" loginPage: "/login"
...@@ -149,7 +146,5 @@ global: ...@@ -149,7 +146,5 @@ global:
code: code:
admin: ROLE_1001 admin: ROLE_1001
decryptKey: cyKey decryptKey: cyKey
#文件上传 resetPassword: 123456
cbs:
imagesPath: E:/static/
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<!--滚动策略--> <!--滚动策略-->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--路径--> <!--路径-->
<fileNamePattern>E:\static\test\info.%d.log</fileNamePattern> <fileNamePattern>/working/test/info.%d.log</fileNamePattern>
</rollingPolicy> </rollingPolicy>
</appender> </appender>
...@@ -45,18 +45,17 @@ ...@@ -45,18 +45,17 @@
<!--滚动策略--> <!--滚动策略-->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--路径--> <!--路径-->
<fileNamePattern>E:\static\test\error.%d.log</fileNamePattern> <fileNamePattern>/working/test/error.%d.log</fileNamePattern>
</rollingPolicy> </rollingPolicy>
</appender> </appender>
<!-- 将日志写入数据库 -->
<appender name="DBLog" class="org.rcisoft.core.log.CyDbLogAppender"> <appender name="DBLog" class="org.rcisoft.core.log.CyDbLogAppender">
<connectionSource class="ch.qos.logback.core.db.DataSourceConnectionSource"> <connectionSource class="ch.qos.logback.core.db.DataSourceConnectionSource">
<dataSource class="org.apache.tomcat.jdbc.pool.DataSource"> <dataSource class="com.alibaba.druid.pool.DruidDataSource">
<driverClassName class="com.mysql.jdbc.Driver" /> <driverClassName class="com.mysql.jdbc.Driver" />
<url>jdbc:mysql://127.0.0.1:3306/mall3?characterEncoding=UTF-8</url> <url>jdbc:mysql://127.0.0.1:3306/mall?useUnicode=true&amp;characterEncoding=UTF-8&amp;useSSL=false&amp;zeroDateTimeBehavior=convertToNull&amp;allowMultiQueries=true</url>
<username>root</username> <username>root</username>
<password>123456</password> <password>cy</password>
</dataSource> </dataSource>
</connectionSource> </connectionSource>
...@@ -80,6 +79,11 @@ ...@@ -80,6 +79,11 @@
<dateformat>yyyy-MM-dd HH:mm:ss</dateformat> <dateformat>yyyy-MM-dd HH:mm:ss</dateformat>
</appender> </appender>
<!--用户操作日志logger -->
<logger name="DBLog" level="INFO" >
<appender-ref ref="DBLog"/>
</logger>
<!-- 用户操作日志logger --> <!-- 用户操作日志logger -->
<!--<logger name="DBLog" level="INFO" >--> <!--<logger name="DBLog" level="INFO" >-->
<!--<appender-ref ref="DBLog"/>--> <!--<appender-ref ref="DBLog"/>-->
...@@ -91,7 +95,7 @@ ...@@ -91,7 +95,7 @@
<logger name="org.springframework.aop.aspectj" level="ERROR"/> <logger name="org.springframework.aop.aspectj" level="ERROR"/>
<springProfile name="dev"> <springProfile name="dev">
<root level="debug"> <root level="info">
<appender-ref ref="consoleLog" /> <appender-ref ref="consoleLog" />
<appender-ref ref="fileInfoLog" /> <appender-ref ref="fileInfoLog" />
<appender-ref ref="fileErrorLog" /> <appender-ref ref="fileErrorLog" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment