初次上手Eureka, 配置Server报错了这个错误, Caused by: org.xml.sax.SAXParseException: 前言中不允许有内容。
Caused by: org.xml.sax.SAXParseException: 前言中不允许有内容。 at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327) at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1473) at com.sun.org.apache.xerces.internal.impl.XMLdocumentScannerImpl$PrologDriver.next(XMLdocumentScannerImpl.java:994) at com.sun.org.apache.xerces.internal.impl.XMLdocumentScannerImpl.next(XMLdocumentScannerImpl.java:602) at com.sun.org.apache.xerces.internal.impl.XMLdocumentFragmentScannerImpl.scandocument(XMLdocumentFragmentScannerImpl.java:505) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243) at com.sun.org.apache.xerces.internal.jaxp.documentBuilderImpl.parse(documentBuilderImpl.java:339) at sun.util.xml.PlatformXmlPropertiesProvider.getLoadingDoc(PlatformXmlPropertiesProvider.java:106) at sun.util.xml.PlatformXmlPropertiesProvider.load(PlatformXmlPropertiesProvider.java:78) ... 38 common frames omitted
检查后发现是: maven依赖导入的问题, 但是具体不知道什么原因, 最终把依赖改成下面这个样子就好了
org.springframework.cloud spring-cloud-starter-netflix-eureka-server3.0.4 org.springframework.boot spring-boot-dependencies2.6.1 org.springframework.boot spring-boot-starter-web2.6.1 org.springframework.boot spring-boot-starter-actuator2.6.1 org.springframework.boot spring-boot-devtools2.6.1
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)