Sort out a few questions about integrating the ssm aggregation project framework test today

When writing the service and controller layers, there will be problems every time the class injection of pojo is called. After thinking about it for a long time, I can't find any dependencies except the problem. Force Alt+Enter to solve.

Appears when running the underlying dao interface


This is when the mapper.xml file is not found when called. solution:

Also, if it is found that your mapper cannot be scanned, add it to the build of the top-level pom file of the execution project.

        <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>

Then there is the question that has troubled me for a long time:


After tossing for many times to no avail, and finally publishing the project directly to the local tomcat, the test was successful, the reason for the tomcat plug-in! ! (It is recommended not to use plugins):


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325732593&siteId=291194637