Git Product home page Git Product logo

spring-cloud's Introduction

Spring Starter 遇到的坑

场景:SpringBoot Starter 打包一直失败,尝试网上若干方法后,不见成功。

原因:pom.xml 继承了 SpringBoot Parent ,因此每次打包都是可执行的包,然后 stater 没有主类打包失败。

解决方案:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.1.7.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

<!-- 加入这个不用加 SpringBoot-parent 依赖,也可以管理依赖 -->
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-dependencies</artifactId>
            <version>${springboot.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>${spring-cloud.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

第一个坑解决了,第二个坑聚合工程必须 install 的坑,根据提示 install

第三个坑,项目打包后启动无法发现主类清单

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <!-- 防止主清单为空 -->
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                </includes>
            </resource>
        </resources>
    </build>

打印汇编信息

下载后放入对应的 jre 文件下

链接: https://pan.baidu.com/s/1Nmd-AXzVC0fICNqGEHePFw 提取码: kbk5

-XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly

MysqlQuery.g4 用法

spring-cloud's People

Contributors

xwzl avatar

Watchers

James Cloos avatar

spring-cloud's Issues

同学,您这个项目引入了163个开源组件,存在47个漏洞,辛苦升级一下

检测到 xwzl/spring-cloud 一共引入了163个开源组件,存在47个漏洞

漏洞标题:netty 安全漏洞
缺陷组件:io.netty:[email protected]
漏洞编号:CVE-2021-37136
漏洞描述:Netty是Netty社区的一款非阻塞I/O客户端-服务器框架,它主要用于开发Java网络应用程序,如协议服务器和客户端等。
netty存在安全漏洞,该漏洞源于Bzip2 decompression decoder功能不允许对解压输出数据设置大小限制(这会影响解压期间使用的分配大小)。攻击者可利用该漏洞引发DoS攻击。
影响范围:(∞, 4.1.68.Final)
最小修复版本:4.1.68.Final
缺陷组件引入路径:com.spring:[email protected]>org.elasticsearch.client:[email protected]>org.elasticsearch.client:[email protected]>org.elasticsearch.plugin:[email protected]>io.netty:[email protected]

另外还有47个漏洞,详细报告:https://mofeisec.com/jr?p=acf12c

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.