Browse Source

关闭flowable自动建表功能,需要则手动导入sql

test
smallchill 5 years ago
parent
commit
99b1590602
  1. 2
      blade-ops/blade-flow-design/src/main/java/org/springblade/flow/config/SqlSessionConfiguration.java
  2. 9
      blade-ops/blade-flow-design/src/main/java/org/springblade/flow/filter/UserHandlerInterceptor.java
  3. 2
      blade-ops/blade-flow-design/src/main/resources/application-dev.yml
  4. 4
      blade-ops/blade-flow-design/src/main/resources/application.yml
  5. 3
      blade-ops/blade-flow-design/src/main/resources/mybatis/mybatis-config.xml
  6. 1
      blade-ops/blade-flow/src/main/resources/application.yml

2
blade-ops/blade-flow-design/src/main/java/org/springblade/flow/config/SqlSessionConfiguration.java

@ -38,7 +38,7 @@ public class SqlSessionConfiguration {
@Primary
@Bean(name = "sqlSessionFactory")
public SqlSessionFactory SqlSessionFactory(DataSource dataSource) throws Exception {
public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception {
SqlSessionFactoryBean sessionFactoryBean = new SqlSessionFactoryBean();
sessionFactoryBean.setDataSource(dataSource);
Resource resource = new PathMatchingResourcePatternResolver().getResource("classpath:mybatis/mybatis-config.xml");

9
blade-ops/blade-flow-design/src/main/java/org/springblade/flow/filter/UserHandlerInterceptor.java

@ -19,6 +19,7 @@ package org.springblade.flow.filter;
import org.flowable.idm.api.User;
import org.flowable.idm.engine.impl.persistence.entity.UserEntityImpl;
import org.flowable.ui.common.security.SecurityUtils;
import org.springframework.lang.NonNull;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;
@ -37,7 +38,7 @@ import static org.springblade.flow.constant.FlowableConstant.*;
public class UserHandlerInterceptor implements HandlerInterceptor {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
public boolean preHandle(HttpServletRequest request, @NonNull HttpServletResponse response, @NonNull Object handler) {
String servletPath = request.getServletPath();
if (servletPath.endsWith(CSS) || servletPath.endsWith(JS) || servletPath.endsWith(JPG) || servletPath.endsWith(PNG)) {
return true;
@ -51,14 +52,12 @@ public class UserHandlerInterceptor implements HandlerInterceptor {
}
@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
ModelAndView modelAndView) throws Exception {
public void postHandle(@NonNull HttpServletRequest request, @NonNull HttpServletResponse response, @NonNull Object handler, ModelAndView modelAndView) throws Exception {
HandlerInterceptor.super.postHandle(request, response, handler, modelAndView);
}
@Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
throws Exception {
public void afterCompletion(@NonNull HttpServletRequest request, @NonNull HttpServletResponse response, @NonNull Object handler, Exception ex) throws Exception {
HandlerInterceptor.super.afterCompletion(request, response, handler, ex);
}

2
blade-ops/blade-flow-design/src/main/resources/application-dev.yml

@ -10,6 +10,6 @@ spring:
#username: postgres
#password: 123456
# Oracle
#url: jdbc:oracle:thin:@127.0.0.1:49161:orcl
#url: jdbc:oracle:thin:@127.0.0.1:1521:orcl
#username: BLADEX_FLOW
#password: oracle

4
blade-ops/blade-flow-design/src/main/resources/application.yml

@ -36,15 +36,13 @@ spring:
session-stat-max-count: 10
main:
allow-bean-definition-overriding: true
devtools:
add-properties: false
flowable:
activity-font-name: \u5B8B\u4F53
label-font-name: \u5B8B\u4F53
annotation-font-name: \u5B8B\u4F53
check-process-definitions: false
database-schema-update: false
common:
app:
idm-url: http://localhost:9999

3
blade-ops/blade-flow-design/src/main/resources/mybatis/mybatis-config.xml

@ -3,7 +3,10 @@
<configuration>
<properties>
<property name="prefix" value="" />
<!-- MySQL使用如下类型 -->
<property name="blobType" value="BLOB" />
<!-- PostgreSQL使用如下类型 -->
<!--<property name="blobType" value="VARCHAR" />-->
</properties>
<mappers>

1
blade-ops/blade-flow/src/main/resources/application.yml

@ -8,3 +8,4 @@ flowable:
label-font-name: \u5B8B\u4F53
annotation-font-name: \u5B8B\u4F53
check-process-definitions: false
database-schema-update: false

Loading…
Cancel
Save