我正在使用弹簧靴2.1.1.Release和Castor 1.2。它开始正常,按预期工作几个小时,然后突然开始遇到以下错误 -
o.c.c.u.Configuration : Failed to load configuration from classpath: /org/castor/core/castor.core.properties
java.util.zip.ZipException: invalid code lengths set
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:164)
at org.springframework.boot.loader.jar.ZipInflaterInputStream.read(ZipInflaterInputStream.java:52)
at java.io.FilterInputStream.read(FilterInputStream.java:107)
at java.util.Properties$LineReader.readLine(Properties.java:435)
at java.util.Properties.load0(Properties.java:353)
at java.util.Properties.load(Properties.java:341)
at org.castor.core.util.Configuration.loadFromClassPath(Configuration.java:187)
at org.castor.core.util.Configuration.loadDefaultProperties(Configuration.java:136)
at org.castor.core.CoreConfiguration.<init>(CoreConfiguration.java:49)
at org.castor.xml.XMLConfiguration.newInstance(XMLConfiguration.java:58)
at org.castor.xml.AbstractInternalContext.<init>(AbstractInternalContext.java:121)
at org.castor.xml.BackwardCompatibilityContext.<init>(BackwardCompatibilityContext.java:45)
at org.exolab.castor.xml.Unmarshaller.<init>(Unmarshaller.java:206)
罐子中存在于boot-inf lib castor-1.2.2.jar
我们是否需要在类路径中的某个地方放置/org/cordor/core.core.core.properties解决此问题?请建议
通常应该有一个默认属性文件。正如手册在https://castor-data-binding.github.io/castor/reference-guide/reference/xml/xml/xml-properties.html上所说的那样>