欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

啟動SpringBoot報錯Input length = 1問題及解決

 更新時間:2023年05月12日 10:15:25   作者:xsqsharp  
這篇文章主要介紹了啟動SpringBoot報錯Input length = 1問題及解決方案,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教

啟動SpringBoot報錯Input length = 1問題

報錯信息

maven-resources-plugin:3.2.0:resources (default-resources) on project jcy_interface_services: Input length = 1 -> [Help 1]

錯誤原因

maven,resource目錄下配置文件的編碼格式未設(shè)置。默認為GBK編碼格式,需要在idea中設(shè)置編碼為UTF-8。

解決辦法

1.Settings---->File Encodings----> 凡是設(shè)計編碼格式的選項全部修改為UTF-8

2.重啟idea

3.重點注意:將原來配置文件中的注釋刪除,重新寫上注釋,否者還會出現(xiàn)亂碼,無法運行。

解決一些Springboot啟動報錯問題

常見的兩個原因

1、控制臺信息如下

Connected to the target VM, address: ‘127.0.0.1:50617’, transport: ‘socket’
Disconnected from the target VM, address: ‘127.0.0.1:50617’, transport: ‘socket’
Process finished with exit code 0  

原因是某個 .xml文件 被注釋 釋放即可,!

2、報錯信息如下

org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat

org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:155) ~[spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) [spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) [spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) [spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    at com.ecjtu.demo.DemoApplication.main(DemoApplication.java:15) [classes/:?]
Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
    at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:126) ~[spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:86) ~[spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:409) ~[spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:174) ~[spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:179) ~[spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:152) ~[spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    ... 8 more
Caused by: java.lang.IllegalStateException: StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[] failed to start
    at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.rethrowDeferredStartupExceptions(TomcatWebServer.java:172) ~[spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:110) ~[spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:86) ~[spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:409) ~[spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:174) ~[spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:179) ~[spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:152) ~[spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    ... 8 more

1、首先得去看配置文件application.yml,pom.xml,程序入口類。這三個

2、把@EnableEurekaServer注解和關(guān)于eureka的配置都去掉 如果可以跑起來 就去引入jaxb-api;

注:從java9開始,模塊化的概念使JAXB默認沒有加載;jaxb-api是存在jdk中的,只是默認沒有加載而已,我們需要手動引入。要問這個jaxb-api是什么作用 大家可以去百度一下

總結(jié)

以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。

相關(guān)文章

  • Java 類動態(tài)添加屬性字段的操作

    Java 類動態(tài)添加屬性字段的操作

    這篇文章主要介紹了Java 類動態(tài)添加屬性字段的操作,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
    2021-02-02
  • 使用java技術(shù)抓取網(wǎng)站上彩票雙色球信息詳解

    使用java技術(shù)抓取網(wǎng)站上彩票雙色球信息詳解

    這篇文章主要介紹了使用java技術(shù)抓取網(wǎng)站上彩票雙色球信息詳解,web結(jié)果由html+js+css組成,html結(jié)構(gòu)都有一定的規(guī)范,數(shù)據(jù)動態(tài)交互可以通過js實現(xiàn)。,需要的朋友可以參考下
    2019-06-06
  • Java幾個實例帶你進階升華下篇

    Java幾個實例帶你進階升華下篇

    與其明天開始,不如現(xiàn)在行動,本文為你帶來幾個Java書寫的實際案例,對鞏固編程的基礎(chǔ)能力很有幫助,快來一起往下看看吧
    2022-03-03
  • httpclient提交json參數(shù)的示例詳解

    httpclient提交json參數(shù)的示例詳解

    httpclient使用post提交json參數(shù),和使用表單提交區(qū)分,本文結(jié)合示例代碼講解的非常詳細,補充介紹了HttpClient請求傳json參數(shù)的案例代碼,感興趣的朋友一起看看吧
    2024-02-02
  • Java設(shè)計模式編程中的工廠方法模式和抽象工廠模式

    Java設(shè)計模式編程中的工廠方法模式和抽象工廠模式

    這篇文章主要介紹了Java設(shè)計模式編程中的工廠方法模式和抽象工廠模式,設(shè)計模式的建立有利于團隊協(xié)作時代碼的共同維護,需要的朋友可以參考下
    2016-01-01
  • IDEA最新激活碼2021(IDEA2020.3.2最新永久激活方法)

    IDEA最新激活碼2021(IDEA2020.3.2最新永久激活方法)

    這篇文章主要介紹了IDEA最新激活碼2021(IDEA2020.3.2最新永久激活方法),本文通過實例圖文相結(jié)合給大家介紹的非常詳細,對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2020-12-12
  • 一文詳解Spring?AOP的配置與使用

    一文詳解Spring?AOP的配置與使用

    面向切面編程(俗稱AOP)提供了一種面向?qū)ο缶幊?俗稱OOP)的補充,面向?qū)ο缶幊套詈诵牡膯卧穷?class),然而面向切面編程最核心的單元是切面(Aspects)。本文就來和大家聊聊AOP的配置與使用,感興趣的可以了解一下
    2022-11-11
  • SpringCloud之監(jiān)控數(shù)據(jù)聚合Turbine的實現(xiàn)

    SpringCloud之監(jiān)控數(shù)據(jù)聚合Turbine的實現(xiàn)

    這篇文章主要介紹了SpringCloud之監(jiān)控數(shù)據(jù)聚合Turbine的實現(xiàn),文中通過示例代碼介紹的非常詳細,對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2019-08-08
  • Java死鎖代碼實例及產(chǎn)生死鎖必備的四個條件

    Java死鎖代碼實例及產(chǎn)生死鎖必備的四個條件

    這篇文章主要介紹了Java死鎖代碼實例及產(chǎn)生死鎖必備的四個條件,Java 發(fā)生死鎖的根本原因是,在申請鎖時發(fā)生了交叉閉環(huán)申請,synchronized在開發(fā)中最好不要嵌套使用,容易導(dǎo)致死鎖,需要的朋友可以參考下
    2024-01-01
  • Spring創(chuàng)建Bean的生命周期詳析

    Spring創(chuàng)建Bean的生命周期詳析

    這篇文章主要介紹了Spring創(chuàng)建Bean的生命周期詳析,文章圍繞主題展開詳細的內(nèi)容介紹,具有一定的參考價值,需要的小伙伴可以參考一下
    2022-09-09

最新評論