zoukankan      html  css  js  c++  java
  • Spring Boot 启动报错 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 37

    使用命令 java -jar springBoot.jar  启动项目,结果报错如下:

    Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 37
            at java.lang.String.substring(String.java:1963)
            at org.springframework.boot.loader.jar.JarFile.createJarFileFromDirectoryEntry(JarFile.java:278)
            at org.springframework.boot.loader.jar.JarFile.createJarFileFromEntry(JarFile.java:258)
            at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:248)
            at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:237)
            at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchive(JarFileArchive.java:103)
            at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchives(JarFileArchive.java:87)
            at org.springframework.boot.loader.PropertiesLauncher.addNestedEntries(PropertiesLauncher.java:480)
            at org.springframework.boot.loader.PropertiesLauncher.getClassPathArchives(PropertiesLauncher.java:418)
            at org.springframework.boot.loader.Launcher.launch(Launcher.java:49)
            at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:521)

    原因是,Spring Boot项目中,resources目录中,含有中文的文件夹,所以导致报错,所以,以后文件夹和文件的命名,一定最好使用英文!!!!

  • 相关阅读:
    Quartz使用总结
    ubuntu 16.04 下载源
    samba搭建
    搭建FTP服务器
    ubuntu 快捷图标
    mysql Fatal error encountered during command execution
    vs2013调试的时候卡顿
    javascript父窗口与子窗口通信
    mysql设置字体
    前台声明变量
  • 原文地址:https://www.cnblogs.com/jiafuwei/p/8514637.html
Copyright © 2011-2022 走看看