本篇文章為大家展示了在Springcloud中怎么利用GateWay對網(wǎng)關(guān)進(jìn)行配置,內(nèi)容簡明扼要并且容易理解,絕對能使你眼前一亮,通過這篇文章的詳細(xì)介紹希望你能有所收獲。
1.配置網(wǎng)關(guān)9527
gateway作為網(wǎng)關(guān)需要和其他的應(yīng)用一樣需要注冊進(jìn)eureka中進(jìn)行管理,先創(chuàng)建應(yīng)用gateway9527
pom文件,關(guān)鍵是gateway依賴
com.bai cloud-api-common ${project.version} org.springframework.cloud spring-cloud-starter-gateway org.springframework.cloud spring-cloud-starter-netflix-eureka-client org.springframework.boot spring-boot-devtools runtime true org.projectlombok lombok true org.springframework.boot spring-boot-starter-test test