gpt4 book ai didi

java - 运行 TomCat 时 Intellij 中的安全错误

转载 作者:行者123 更新时间:2023-11-28 23:24:59 26 4
gpt4 key购买 nike

当我想在 Intellij 中运行 tomcat 时,我每隔 10 秒就会收到一次错误消息,而 localhost:8080 没有显示任何内容。谁能帮帮我?

WARNING - "null OEJP/4.6" FAIL "Security error - [Ljava.net.URI; is not whitelisted as deserialisable, prevented before loading it, customize tomee.serialization.class.blacklist and tomee.serialization.class.whitelist to add it to not fail there. -Dtomee.serialization.class.blacklist=- -Dtomee.serialization.class.whitelist=[Ljava.net.URI; for instance (or in conf/system.properties)." - Debug for StackTrace

最佳答案

我真的不记得我为解决这个问题所采取的确切步骤,但我可以说我知道错误与我使用 intellij 的 spring 项目的 Artifact 有某种关系,并且在将波纹管部分添加到我的 pom.xml 之后。 xml 并使 maven 自动导入需要的东西,然后在创建新的 tomCat 服务器中创建新的 Artifact ,问题就全部消失了。

我在 groupID、artifactID 和 version 之后添加这些标签

<packaging>war</packaging>
<name>AnyName</name>

然后这些行到 pom 的末尾:

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<warSourceDirectory>src/main/webapp</warSourceDirectory>
<warName>Example</warName>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
<finalName>Example</finalName>
</build>

关于java - 运行 TomCat 时 Intellij 中的安全错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38472592/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com