组件代码

jpaas-form为平台独立的运行应用,依赖Jpaas-system,jpaas-user的服务。同时也依赖平台的基础组件。

应用配置

在平台配置中,只需要配置application.yml文件,如下所示:

  1. # 缺省数据源
  2. defaultDs:
  3. string:
  4. url: jdbc:mysql://${redxun.datasource.ip}:${redxun.datasource.port}/jpaas_form?characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8
  5. username: ${redxun.datasource.username}
  6. password: ${redxun.datasource.password}
  7. driver-class-name: com.mysql.cj.jdbc.Driver
  8. validationQuery: select 1
  9. filters: stat
  10. int:
  11. initialSize: 5
  12. minIdle: 5
  13. maxActive: 10
  14. maxPoolPreparedStatementPerConnectionSize: 20
  15. long:
  16. maxWait: 60000
  17. timeBetweenEvictionRunsMillis: 60000
  18. minEvictableIdleTimeMillis: 300000
  19. boolean:
  20. testWhileIdle: true
  21. testOnBorrow: false
  22. testOnReturn: false
  23. poolPreparedStatements: true
  24. mybatis:
  25. mapper-locations: classpath:/mapper/**/*Mapper.xml
  26. #文档配置
  27. redxun:
  28. swagger:
  29. enabled: true
  30. title: 单据中心
  31. description: 单据文档
  32. version: 1.0
  33. base-package: com.redxun.form.core.controller
  34. cache-manager:
  35. configs:
  36. - key: form
  37. second: 300
  38. - key: portal_menu
  39. second: 1800
  40. #多租户配置
  41. tenant:
  42. enable: true
  43. ignoreTables:
  44. #单据表与字段前置
  45. prefix:
  46. table: W_
  47. colpre: F_
  48. #分布式事务配置
  49. seata:
  50. enabled: true
  51. application-id: ${spring.application.name}
  52. tx-service-group: form_tx_group
  53. enable-auto-data-source-proxy: true
  54. #注册至Nacos配置中
  55. registry:
  56. type: nacos
  57. nacos:
  58. application: seata-server
  59. server-addr: ${nacos.address}
  60. group: DEFAULT_GROUP
  61. userName: nacos
  62. password: nacos
  63. # Setea的Nacos的配置
  64. config:
  65. type: nacos
  66. nacos:
  67. namespace:
  68. serverAddr: ${nacos.address}
  69. group: SEATA_GROUP
  70. cluster: default
  71. userName: nacos
  72. password: nacos

以上配置只需要修改数据库的名即可。

包划分

基于表分类进行包拆分:

  • bo

管理业务对象的实体,包括entity,dao,service,controller.

  • core

管理业务对象的外围扩展功能,包括entity,dao,service,controller

文档更新时间: 2022-01-24 18:04   作者:zyg