springboot mybatis activiti 整合
阿新 • • 發佈:2018-12-30
原始碼地址:
https://github.com/todayido/springbootActiviti
idea 提示錯誤:No beans of ‘UserMapper’ type found.
解決:UserMapper 新增標籤 @Repository,注意@Resource也不行
mybatis 提示錯誤:Invalid bound statement(not found)
原因:生成的classes路徑下沒有XML檔案
解決:pom.xml 檔案中在 builder 標籤中新增,使用 springboot:run 啟動專案即可,有時候 idea 中的 shift + F10 因為無法生成 XML 檔案,待定解決。
<build> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includes> <filtering>false</filtering> </resource> <resource> <directory>src/main/resources</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includes> <filtering>false</filtering> </resource> </resources> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <mainClass>com.example.demo.Application</mainClass> </configuration> </plugin> </plugins> </build>