组件代码
jpaas-form为平台独立的运行应用,依赖Jpaas-system,jpaas-user的服务。同时也依赖平台的基础组件。
应用配置
在平台配置中,只需要配置application.yml文件,如下所示:
# 缺省数据源
defaultDs:
string:
url: jdbc:mysql://${redxun.datasource.ip}:${redxun.datasource.port}/jpaas_form?characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8
username: ${redxun.datasource.username}
password: ${redxun.datasource.password}
driver-class-name: com.mysql.cj.jdbc.Driver
validationQuery: select 1
filters: stat
int:
initialSize: 5
minIdle: 5
maxActive: 10
maxPoolPreparedStatementPerConnectionSize: 20
long:
maxWait: 60000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
boolean:
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
mybatis:
mapper-locations: classpath:/mapper/**/*Mapper.xml
#文档配置
redxun:
swagger:
enabled: true
title: 单据中心
description: 单据文档
version: 1.0
base-package: com.redxun.form.core.controller
cache-manager:
configs:
- key: form
second: 300
- key: portal_menu
second: 1800
#多租户配置
tenant:
enable: true
ignoreTables:
#单据表与字段前置
prefix:
table: W_
colpre: F_
#分布式事务配置
seata:
enabled: true
application-id: ${spring.application.name}
tx-service-group: form_tx_group
enable-auto-data-source-proxy: true
#注册至Nacos配置中
registry:
type: nacos
nacos:
application: seata-server
server-addr: ${nacos.address}
group: DEFAULT_GROUP
userName: nacos
password: nacos
# Setea的Nacos的配置
config:
type: nacos
nacos:
namespace:
serverAddr: ${nacos.address}
group: SEATA_GROUP
cluster: default
userName: nacos
password: nacos
以上配置只需要修改数据库的名即可。
包划分
基于表分类进行包拆分:
- bo
管理业务对象的实体,包括entity,dao,service,controller.
- core
管理业务对象的外围扩展功能,包括entity,dao,service,controller
文档更新时间: 2022-01-24 18:04 作者:zyg