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 模塊。
spring-boot-starter-web包,會導致Gateway啟動拋出異常
相關推薦
spring-boot-starter-web包,會導致Gateway啟動拋出異常
code pre pid 實現 group boot 因此 添加 artifact 最近在用springcloud搭建一個web應用時,發現如果添加不要引入spring-boot-starter-web包,會導致Gateway啟動拋出異常,故使用 <dependenc
Spring Boot入門第二天:一個基於Spring Boot的Web應用,使用了Spring Data JPA和Freemarker。
per pan let mysq 應用 posit ble host thead 今天打算從數據庫中取數據,並展示到視圖中。不多說,先上圖: 第一步:添加依賴。打開pom.xml文件,添加必要的依賴,完整代碼如下: <?xml version="1.0" enco
linux測試環境,部署spring boot打的jar包,簡易偷懶腳本
head 新的 lena fin abs sta log linux nbsp 當前已有jar在運行,上傳新jar之後,需要刪除舊的,執行新的,一不小心可能就把新的刪了,就寫了個腳本,做下記錄 #!/bin/bash path=/work/server/ fileH
spring boot 打jar包,獲取resource路徑下的檔案
前言:最近在spring boot專案靜態類中獲取resource路徑下檔案,在idea中啟動都可以獲取,但是打包後變成了jar包 就無法獲取到。我想到了兩種方法,一種是根據http訪問靜態資源比如 localhost:9080/static/template/xxx.ftl檔案。另外一種是根據流獲
引入spring-boot-starter-redis包報錯 :unknown
springboot整合redis時,引入spring-boot-starter-redis包報錯,maven找不到這個資源.如下圖: 我的專案中,spring boot是 用的2.0.4版本. spring-boot-starter-redis在spring
springboot2.0整合分頁外掛pagehelper-spring-boot-starter報錯,無法啟動問題
這裡先介紹如何使用springboot2.0整合pagehelper-spring-boot-starter, 新增pom依賴 <dependency> <groupId>com.github.pagehe
spring-Boot之spring-boot-starter------ spring-boot-starter-parent---------spring-boot-starter-web
spring-boot-starter:spring-boot場景啟動器,後面跟的單詞就是場景,比如說後面跟web,就是匯入web場景的所有依賴。 後面跟AOP,就代表使用AOP的參加功能,相應的依賴也會自動匯入進來。 具體看https://docs.spring.io/sp
Idea 新建springboot專案 spring-boot-starter-parent 包maven依賴報錯
今天使用Idea匯入spring-boot 專案時 maven 報錯 <parent> <groupId>org.springframework.boot</gr
SpringBoot 之Spring Boot Starter依賴包及作用
分享一下我老師大神的人工智慧教程吧。零基礎,通俗易懂!風趣幽默!http://www.captainbed.net/ 也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!
spring boot 匯出jar 包,執行報錯無法載入 orcl驅動的問題。
原因是因為orcl資料庫是收費的,所以在pom檔案中無法匯入所以需要手動新增jar包,但是打包的時候無法將手動的jar包打包,只打包maven中的jar。 解決的辦法: 需要自己本地建立一個maven本地倉庫,然後需要配置環境 。 將執行 mvn
Spring boot 總結(1)---Spring-boot-starter-**依賴包說明
1. spring-boot-starter 是Spring Boot的核心啟動器,包含了自動配置、日誌和YAML。 2. spring-boot-starter-amqp 通過spring-rabbit來支援AMQP協議(Advanced Message Queuing P
【Kotlin】spring boot項目中,在Idea下啟動,報錯@Configuration class 'BugsnagClient' may not be final.
post open conf png spa temp 技術 dea and 報錯如下: Exception encountered during context initialization - cancelling refresh attempt: org.spr
springboot2.0+dubbo-spring-boot-starter聚合項目打可執行的jar包
inf 惡心 class int reg spa 打包成 tco public springboot2.0+dubbo聚合項目打可執行的jar包 springboot2.0+dubbo-spring-boot-starter項目服務方打包和以前老版本的dubbo打包方式不
通過docker-composer啟動容器nginx,並完成spring.boot的web站點埠轉發
前面已經講過2篇基於docker的mysql、redis容器編排並啟動。這次將練習下nginx的docker方式的部署,以及通過nginx去代理宿主主機上的Web服務應該怎麼配 PS:(這裡由於nginx是容器上執行,然後web服務是執行在linux上,所以有區別) 準備環境: docker 18.06
springboot整合mapper-spring-boot-starter時,使用SelectByPrimaryKey時出現的型別轉換異常
我也是被這個東西給整蒙了 使用SelectByPrimaryKey時出現的型別轉換異常 java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String at org
springBoot redis -- spring-boot-starter-data-redis與spring-boot-starter-redis兩個包的區別
1、下面是Spring Boot的版本為1.5.9的時候的spring-boot-starter-data-redis的jar包的情況: 2、下面是Spring Boot的版本為1.4.0的時候的spring-boot-starter-data-redis的jar包的情
SpringBoot導包坑之spring-boot-starter-parent
在新建springboot專案裡,有機率從遠端倉庫下載jar包出錯,導致jar包無法匯入.即使我把相關的包都刪完,都不行,要麼換個倉庫,要麼換個版本.下面給出兩個比較便利的方法 <parent> <groupId>org.springframew
使用Eclipse除錯Spring boot工程的時候,總是會直接進入SilentExitExceptionHandler中
使用Eclipse除錯Spring boot工程的時候,總是會直接進入SilentExitExceptionHandler中,無法正常的debug,嚴重影響效率,在部落格上看到了別人的參考方案,在此記憶一下,方便檢視。 解決方案:Window-->Pre
微服務架構學習筆記(一):gRPC Spring Boot Starter 2.2.0 釋出,及使用步驟
簡介 gRPC Spring Boot Starter 專案是一個 gRPC 的 Spring Boot 模組。通過在 Spring Boot 中內嵌一個 gRPC Server 對外提供服務,並支援 Spring Cloud 的服務發現、註冊、鏈路跟蹤等等。 更新內容 在 2.
Spring Boot打jar包執行,引用外部jar包
剛遇到這個問題的時候,一臉懵逼,已經打好jar包在伺服器上執行,訪問介面的時候卻提示java.lang.NoClassDefFoundError。後來發現是因為引用了一個語音合成的jar包,這個jar包不是通過maven引入的事直接add Jar新增的,所以在打包執行的時候讀