最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

啟動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)文章

  • Maven直接依賴、間接依賴、依賴沖突、依賴仲裁的實現(xiàn)

    Maven直接依賴、間接依賴、依賴沖突、依賴仲裁的實現(xiàn)

    本文主要介紹了Maven直接依賴、間接依賴、依賴沖突、依賴仲裁的實現(xiàn),文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧
    2023-09-09
  • 詳解Spring Boot 事務的使用

    詳解Spring Boot 事務的使用

    spring Boot 使用事務非常簡單,首先使用注解 @EnableTransactionManagement 開啟事務支持后,然后在訪問數(shù)據(jù)庫的Service方法上添加注解 @Transactional 便可。接下來通過本文重點給大家介紹spring boot事務的使用,需要的的朋友參考下吧
    2017-04-04
  • SpringBoot項目啟動報錯"找不到或無法加載主類"的解決方法

    SpringBoot項目啟動報錯"找不到或無法加載主類"的解決方法

    在使用 IntelliJ IDEA 開發(fā)基于 Spring Boot 框架的 Java 程序時,可能會出現(xiàn)找不到或無法加載主類 com.example.springboot.SpringbootApplication的錯誤提示,下面我們來看看如何解決吧
    2025-03-03
  • 深入學習Java編程中的字符串的進階使用

    深入學習Java編程中的字符串的進階使用

    這篇文章主要介紹了Java編程中的字符串的高級運用,包括StringBuffer類和StringTokenizer類以及常量池的介紹,需要的朋友可以參考下
    2016-01-01
  • java8 forEach結(jié)合Lambda表達式遍歷 List操作

    java8 forEach結(jié)合Lambda表達式遍歷 List操作

    這篇文章主要介紹了java8 forEach結(jié)合Lambda表達式遍歷 List操作,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
    2020-09-09
  • springMVC+ajax實現(xiàn)文件上傳且?guī)нM度條實例

    springMVC+ajax實現(xiàn)文件上傳且?guī)нM度條實例

    本篇文章主要介紹了springMVC+ajax實現(xiàn)文件上傳且?guī)нM度條實例,具有一定的參考價值,有興趣的可以了解一下。
    2017-01-01
  • Security中的WebSecurityConfigurerAdapter詳解

    Security中的WebSecurityConfigurerAdapter詳解

    這篇文章主要介紹了Security中的WebSecurityConfigurerAdapter詳解,今天我們要進一步的的學習如何自定義配置Spring?Security,本文結(jié)合實例代碼給大家介紹的非常詳細,需要的朋友可以參考下
    2023-07-07
  • MyBatis中useGenerateKeys的使用解析

    MyBatis中useGenerateKeys的使用解析

    這篇文章主要介紹了MyBatis中useGenerateKeys的使用,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教
    2021-09-09
  • Java中的異常處理之try-catch使用詳解

    Java中的異常處理之try-catch使用詳解

    這篇文章主要介紹了Java中的異常處理之try-catch使用的相關(guān)資料,包括異常的概念、try-catch語句的基本結(jié)構(gòu)、使用示例、多個catch塊的使用、try-catch-finally的執(zhí)行順序、try-with-resources語句以及總結(jié),需要的朋友可以參考下
    2024-12-12
  • java編程Reference核心原理示例源碼分析

    java編程Reference核心原理示例源碼分析

    這篇文章主要為大家介紹了java編程Reference的核心原理以及示例源碼分析,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步早日升職加薪
    2022-01-01

最新評論

开原市| 拉孜县| 正宁县| 马龙县| 民丰县| 格尔木市| 元氏县| 玛曲县| 彝良县| 六枝特区| 长岛县| 石嘴山市| 阳新县| 平利县| 望城县| 兴化市| 奎屯市| 绩溪县| 板桥市| 临西县| 睢宁县| 濮阳县| 黄大仙区| 布尔津县| 昭苏县| 文山县| 松滋市| 东港市| 合阳县| 松溪县| 宝清县| 南康市| 新泰市| 古交市| 靖边县| 上蔡县| 苏尼特左旗| 昌图县| 昭觉县| 三都| 永泰县|