返回列表 發布新帖

評論1

姜文盛樓主Lv.9 發表於 2025-3-13 15:00 | 查看全部
當然可以, 大致上的作法如下, 如果需要更詳細的說明及範例, 可詢問負責您們的系統開發顧問
1.適用DAP版本 : 5.1.0+
2.pom.xml增加
<dependency>
<groupId>com.digiwin</ groupId>
<artifactId>dwapiplatform-mybatis-plus-starter</artifactId>
<version>${api.version}</version><!-- 請依實際環境配置版號-->
</dependency>
3.application.properties 配置
mybatis-plus的config與 mapper 路徑依照原本的配置方式即可
啟用與相關配置範例
#关闭平台元数据
dbEnabled=false
spring.datasource.url=jdbc:mariadb://127.0.0.1:3306/myschema
spring.datasource.username=myusername
spring.datasource.password=mypassword
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
#默认启用; 當要臨時關閉,可以設定為false
#dap.mybatis.enabled=true
#扫描 Mapper所屬的packeage
dap.mybatis.basePackage=com.digiwin.dwsampleapp1.dem,com.demo.abc
注意:pom.xml 要有相對應的 jdbc driver 依賴

回復

您需要登錄後才可以回帖 登錄 | 立即注册

本版積分規則

  • 加入Line諮詢
Copyright © 2026 鼎新數智股份有限公司 版權所有 All Rights Reserved. Powered by Discuz! X5.0
關燈 在本版發帖
即将开放
返回頂部
快速回復 返回頂部 返回列表