pom.xml文件添加下面依赖: <dependency> <groupId>javax</groupId> <artifactId>javaee-api</artifactId> <version>7.0</version> </dependency>
然后再运行,发现可以成功运行了