1、java.lang.SecurityException: sealing violation: package javax.servlet is sealed
java.lang.SecurityException: sealing violation: package javax.servlet is sealed at java.net.URLClassLoader.getAndVerifyPackage(URLClassLoader.java:399) at java.net.URLClassLoader.definePackageInternal(URLClassLoader.java:419) at java.net.URLClassLoader.defineClass(URLClassLoader.java:451)
原因:添加了javax.servlet和javax.servlet-api
<dependency> <groupId>jetty</groupId> <artifactId>javax.servlet</artifactId> <version>5.1.12</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> </dependency>
解决方案:
删除 javax.servlet
时间: 2024-10-13 06:43:13