當然可以, 大致上的作法如下, 如果需要更詳細的說明及範例, 可詢問負責您們的系統開發顧問
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 依賴 |