spring-boot-starter-web包,會導致Gateway啟動拋出異常


最近在用springcloud搭建一個web應用時,發現如果添加不要引入spring-boot-starter-web包,會導致Gateway啟動拋出異常,故使用

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId>
</dependency>
就不需要添加
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<!--<version>2.1.1.RELEASE</version>-->
</dependency>


網上查了一下發現:Spring Cloud Gateway 是使用 netty+webflux 實現因此不需要再引入 web 模塊。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM