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

啟動(dòng)SpringBoot報(bào)錯(cuò)Input length = 1問題及解決

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

啟動(dòng)SpringBoot報(bào)錯(cuò)Input length = 1問題

報(bào)錯(cuò)信息

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

錯(cuò)誤原因

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

解決辦法

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

2.重啟idea

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

解決一些Springboot啟動(dòng)報(bào)錯(cuò)問題

常見的兩個(gè)原因

1、控制臺(tái)信息如下

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  

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

2、報(bào)錯(cuò)信息如下

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,程序入口類。這三個(gè)

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

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

總結(jié)

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

相關(guān)文章

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

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

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

    詳解Spring Boot 事務(wù)的使用

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

    SpringBoot項(xiàng)目啟動(dòng)報(bào)錯(cuò)"找不到或無法加載主類"的解決方法

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

    深入學(xué)習(xí)Java編程中的字符串的進(jìn)階使用

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

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

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

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

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

    Security中的WebSecurityConfigurerAdapter詳解

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

    MyBatis中useGenerateKeys的使用解析

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

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

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

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

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

最新評(píng)論

苍南县| 金沙县| 金平| 广汉市| 浪卡子县| 新河县| 玉山县| 启东市| 海林市| 化隆| 庆城县| 梓潼县| 抚州市| 洮南市| 耿马| 怀化市| 福州市| 开原市| 华阴市| 共和县| 当雄县| 遂川县| 和龙市| 慈利县| 岳西县| 蒲城县| 固镇县| 库车县| 德清县| 石屏县| 锡林浩特市| 菏泽市| 蒲城县| 深州市| 永川市| 米泉市| 朝阳市| 漳浦县| 宁明县| 托里县| 长宁区|