Eureka报错: org.xml.sax.SAXParseException: 前言中不允许有内容。

Eureka报错: org.xml.sax.SAXParseException: 前言中不允许有内容。,第1张

Eureka报错: org.xml.sax.SAXParseException: 前言中不允许有内容

初次上手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-server
      3.0.4
    

    
      org.springframework.boot
      spring-boot-dependencies
      2.6.1
    

    
      org.springframework.boot
      spring-boot-starter-web
      2.6.1
    

    
      org.springframework.boot
      spring-boot-starter-actuator
      2.6.1
    

    
      org.springframework.boot
      spring-boot-devtools
      2.6.1
    

  

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5660283.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-16

发表评论

登录后才能评论

评论列表(0条)

保存