【发布时间】:2020-06-15 07:52:41
【问题描述】:
我使用的是 Spring Boot,以 NEO4J 作为数据库。我正在使用 Java 13 和 Spring 2.3.1。我的代码中有一个枚举:
package uk.co.osiris.entities;
public enum Involvement {
Master,
Charterer,
Owner,
DesponentOwner,
Agent,
Inspector,
PortAuthority,
Other
}
它不用于 NodeEntity 或 RelationshipEnity。事实上,这个枚举只是在类路径中。它没有在任何地方使用。
当我运行应用程序时,我得到:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.util.ReflectionUtils (file:/home/adrian/.m2/repository/org/springframework/spring-core/5.2.7.RELEASE/spring-core-5.2.7.RELEASE.jar) to field java.lang.Enum.name
WARNING: Please consider reporting this to the maintainers of org.springframework.util.ReflectionUtils
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
我可以,而且对他们来说可能会,只是删除枚举。
但是为什么我会得到这个?
【问题讨论】:
标签: java spring spring-boot exception enums