zoukankan      html  css  js  c++  java
  • SpringBoot问题集锦

    此文件如无特殊说明:springboot均为2.1.4版本

    1.SpringBoot打包成jar后运行提示没有主清单属性
    参考:https://www.cnblogs.com/niceboat/p/6230448.html
    因为我使用spring-boot-dependencies这个BOM代替了spring-boot-starter-parent这个parent POM(详见13.2.2. Using Spring Boot without the parent POM)
    导致spring-boot-maven-plugin的配置项丢失,使得打包后的jar中的MANIFEST.MF文件缺少Main-Class。
    解决:

    <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <version>${spring.version}</version>
        <executions>
            <execution>
                <goals>
                    <goal>repackage</goal>
                </goals>
            </execution>
        </executions>
    </plugin>
    

    2.上传文件出错(关键字:mostPostSize):

    在这里插入图片描述解决办法:
    在这里插入图片描述

    3.修改springboot默认文件大小:
    在这里插入图片描述

    4.feign 不支持 Get requestBody的形式解决方法:

    <dependency>
         <groupId>io.github.openfeign</groupId>
         <artifactId>feign-httpclient</artifactId>
     </dependency>
    

    未完待续…

  • 相关阅读:
    2020-08-20
    2020-08-19
    2020-08-14
    2020-08-13
    使用numpy实现机器学习模型
    分治法学习
    2020-08-09
    2020-08-02
    四月是你的谎言下载
    新博客
  • 原文地址:https://www.cnblogs.com/Kevin-1992/p/12608347.html
Copyright © 2011-2022 走看看