日常踩坑:idea错误: 找不到或无法加载主类 test
今天在整合一个ssm项目时,写了一个测试test却怎么也跑不起来一直报一个错误: 找不到或无法加载主类 test,上网查阅了很多资料,各种办法没有结果后,看到一个博主建议对比其他项目的iml文件,果然发现了不同。
这是报错项目的iml文件:
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="web" name="Web">
<configuration>
<descriptors>
<deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/web/WEB-INF/web.xml" />
</descriptors>
<webroots