For the multi-module project of maven, the resource files cannot be packaged and typed.

The

A project relies on some common logic written in common-core,common-core, including mybatis"s * mapper.xml file.

The

A project ends with a jar package packaged into springboot. Now pack it out, the mapper.xml file in the common-core package is in common-core.jar, and SpringBoot"s mapper scanner cannot scan the xml file in the Jar package.

therefore, if you want to package mapper.xml into A.jar, please let the gods know what to do.

Mar.13,2021

use the maven-dependency-plugin plug-in to configure
normally the mapper.xml in your common-core can be read, as long as your common-core is not packaged in springboot.

Menu