从何处获取 Spring 引导启动程序包中的排除项



我正在使用 Spring 初始化来获得必要的包和下载。下载后,我在pom中进行了一些更改.xml例如排除slf4j等软件包,日志记录(当我计划使用log4j2时(以及在尝试部署到独立服务器时排除tomcat。

我不知道还有哪些项目可以排除。是否有任何文档,例如哪个包包含其他工件?在包装时尽量避免某些罐子,以便我认为我可以减小包装(罐子/战争(的大小。

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-jpa</artifactId>
    <exclusions>
        <exclusion>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-logging</artifactId>
        </exclusion>
    </exclusions>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-batch</artifactId>
    <exclusions>
        <exclusion>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
        </exclusion>
    </exclusions>
</dependency>
<dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-java</artifactId>
        <exclusions>
            <exclusion>
                <artifactId>commons-logging</artifactId>
                <groupId>commons-logging</groupId>
            </exclusion>
        </exclusions>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
    <exclusions>
        <exclusion>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
        </exclusion>
    </exclusions>
</dependency>

所有 Spring 引导入门包都可以在这里找到:

https://github.com/spring-projects/spring-boot/tree/master/spring-boot-project/spring-boot-starters

它们都只是pom.xml文件。您可以通过分析启动包中 pom 的依赖项,从正在使用的任何依赖项中排除所需的任何内容。

最新更新