Commit fc182d5d authored by 李丛阳's avatar 李丛阳

Merge branch 'dev' into 'master'

v1.1 升级springboot2.0 & activiti

v1.1 升级springboot2.0 & activiti

See merge request !15
parents 5893a7bb 5fc0b07f
......@@ -6,22 +6,37 @@
<groupId>org.rcisoft</groupId>
<artifactId>91isoft_spbt_project</artifactId>
<version>1.0-SNAPSHOT</version>
<description> 91isoft_spbt_project </description>
<version>1.1</version>
<description>91isoft_spbt_project</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<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>
<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>
<dependency>
<groupId>org.91isoft</groupId>
<artifactId>91isoft_spbt</artifactId>
<version>1.0.1-SNAPSHOT</version>
<version>2.0.2</version>
</dependency>
</dependencies>
<build>
......
......@@ -127,9 +127,10 @@ cy:
redis: false #是否开启redis缓存
DecryptParam: false #参数加密验证
CySwagger2Config: true
#Security 配置
activiti: true
#Security 配置
security:
permitAll:
permit-all:
permitUnStatic: #允许用户访问的地址(路径)
- "/static/**"
- "/webjars/**"
......@@ -190,6 +191,8 @@ http://localhost:8084/swagger-ui.html#/ 访问swaggerUI
| v1.0 | logback | 日志 | cy |
| v1.0 | jwt | json web token 身份验证 | cy |
| v1.0 | spring-security | 安全性框架 | cy |
| v2.0 | springboot2 | springboot2.0升级 | cy |
| v2.0 | activiti | 工作流引擎 | cy |
### 编码规范
......@@ -248,6 +251,7 @@ ${basedir}/sql
| v1.0 | swagger2 | 文档 | 开启 | 是 |
| v1.0 | multipleDs | 多数据源 | 关闭 | 是 |
| v1.0 | dbLod | 数据库日志 | 关闭 | 是 |
| v2.0 | activiti | 工作流 | 关闭 | 是 |
### pageUtil
......@@ -303,6 +307,12 @@ ${basedir}/sql
## seurity(权限)
#### `application-dev.yml`中`cy.model.security` 下相关配置
1. 目前是登陆后才可访问其他接口
2. 开启所有接口的直接访问:`cy.model.security.permitUnStatic` 下加` - "*/**" `即可
\ No newline at end of file
### 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;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.ImportResource;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.transaction.annotation.EnableTransactionManagement;
......@@ -20,7 +21,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableSwagger2
@EnableScheduling
@EnableGlobalMethodSecurity(prePostEnabled=true)
@MapperScan(basePackages = "org.rcisoft.**.dao")//扫描dao 不需要@repository
@MapperScan(basePackages = {"org.rcisoft.**.dao","org.activiti.dao"})//扫描dao 不需要@repository
public class ProjectApplication {
public static void main(String[] args) {
......
server:
port: 8084
context-path: / #ContextPath must start with '/' and not end with '/'
tomcat:
max-threads: 300
servlet:
context-path: /
session:
timeout: PT480M
#uri-encoding: UTF-8
# ssl:
# key-store: classpath:client1.p12
......@@ -16,9 +19,9 @@ server:
# org.springframework.web: DEBUG
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
password: 123456
password: cy
initial-size: 1
min-idle: 1
max-active: 20
......@@ -62,16 +65,9 @@ pagehelper:
spring:
jackson:
default-property-inclusion: non_null
#http:
# encoding:
# force: true
# charset: UTF-8
# enabled: true
multipart:
max-file-size: 100Mb
max-request-size: 1000Mb
multipart:
max-file-size: 100Mb
max-request-size: 1000Mb
mvc:
throw-exception-if-no-handler-found: true
resources:
......@@ -119,8 +115,9 @@ cy:
entityParam: true
decryptParam: false
swagger2Config: true
activiti: false
security:
permitAll:
permit-all:
permitUnStatic:
- "/static/**"
- "/webjars/**"
......@@ -131,7 +128,7 @@ cy:
- "/code/**/**"
- "/excelUtil/**"
- "/cros/**"
# - "*/**"
- "/**/**"
permitStatic: ["/", "/*.html", "/favicon.ico", "/**/*.html", "/**/*.js", "/**/*.css"]
logoutSuccessUrl: "/login"
loginPage: "/login"
......@@ -149,7 +146,5 @@ global:
code:
admin: ROLE_1001
decryptKey: cyKey
#文件上传
cbs:
imagesPath: E:/static/
resetPassword: 123456
......@@ -24,7 +24,7 @@
<!--滚动策略-->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--路径-->
<fileNamePattern>E:\static\test\info.%d.log</fileNamePattern>
<fileNamePattern>/working/test/info.%d.log</fileNamePattern>
</rollingPolicy>
</appender>
......@@ -45,18 +45,17 @@
<!--滚动策略-->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--路径-->
<fileNamePattern>E:\static\test\error.%d.log</fileNamePattern>
<fileNamePattern>/working/test/error.%d.log</fileNamePattern>
</rollingPolicy>
</appender>
<!-- 将日志写入数据库 -->
<appender name="DBLog" class="org.rcisoft.core.log.CyDbLogAppender">
<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" />
<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>
<password>123456</password>
<password>cy</password>
</dataSource>
</connectionSource>
......@@ -67,19 +66,24 @@
</filter>
<insertsql>
insert into s_log (business_id, message, log_event,
log_status, exception, level,
detail, sort, del_flag, flag,create_date,create_by,update_date,update_by)
values (?,?,?,?,?,?,?,?,?,?,?,?,?,?)
insert into s_log (business_id, message, log_event,
log_status, exception, level,
detail, sort, del_flag, flag,create_date,create_by,update_date,update_by)
values (?,?,?,?,?,?,?,?,?,?,?,?,?,?)
</insertsql>
<params>
%X{businessId},%X{message},%X{log_event},%X{log_status},%X{exception},%X{level},%X{detail},
%X{sort},0,1,%X{createDate},%X{createBy},%X{updateDate},%X{updateBy}
%X{businessId},%X{message},%X{log_event},%X{log_status},%X{exception},%X{level},%X{detail},
%X{sort},0,1,%X{createDate},%X{createBy},%X{updateDate},%X{updateBy}
</params>
<dateformat>yyyy-MM-dd HH:mm:ss</dateformat>
</appender>
<!--用户操作日志logger -->
<logger name="DBLog" level="INFO" >
<appender-ref ref="DBLog"/>
</logger>
<!-- 用户操作日志logger -->
<!--<logger name="DBLog" level="INFO" >-->
<!--<appender-ref ref="DBLog"/>-->
......@@ -91,7 +95,7 @@
<logger name="org.springframework.aop.aspectj" level="ERROR"/>
<springProfile name="dev">
<root level="debug">
<root level="info">
<appender-ref ref="consoleLog" />
<appender-ref ref="fileInfoLog" />
<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