org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘file [XXX.xml]‘;

Following the crud-ssm tutorial in Silicon Valley, insert the following bean tags when configuring the spring environment configuration file applicationcontext.xml,

<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
                <property name="configLocation" value="classpath:mybatis-config"></property>
                <property name="dataSource" ref="dataSource"></property>
                <property name="mapperLocations" value="classpath:mappers/*.xml"></property>
</bean>   

among

 <property name="mapperLocations" value="classpath:mappers/*.xml"></property>

It will be red. You only need to create any. XML file under Resources/maps, but this will lead to Title errors
just enter the project name\target\xxx-1.0-snapshot\WEB-INF\classes\mappers and delete the.XML file created at that time

Read More: