LinZP101 2021-07-28 16:00 采纳率: 57.1%
浏览 82
已结题

如题,怎么在父pom(spring-boot-starter-parent)中排除掉springmvc模块的依赖?

img

如题,怎么在父pom(spring-boot-starter-parent)中排除掉springmvc模块的依赖?在网上查了很多,有说在子pom里添加web依赖,然后改scope为test,但是不管用啊

  • 写回答

1条回答 默认 最新

  • CSDN专家-微编程 2021-07-28 16:09
    关注

    通过exclusion标签,如下

    <exclusions>
        <exclusion>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-web</artifactId>
        </exclusion>
    </exclusions>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 8月6日
  • 已采纳回答 7月29日
  • 创建了问题 7月28日