使用@ContextHierarchy批注。它的javadoc很好地描述了它。在您的情况下,您将使用
@WebAppConfiguration@ContextHierarchy({ @ContextConfiguration(locations = { "classpath*:/meta-INF/spring/applicationContext-*.xml" }), @ContextConfiguration(locations = { "file:src/main/webapp/WEB-INF/spring/mmapp-servlet.xml" })})


