Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-cloud-core
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xingmin
yd-cloud-core
Commits
e4aa5a92
Commit
e4aa5a92
authored
Nov 12, 2025
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
7f716143
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
11 deletions
+22
-11
yd-gateway/pom.xml
+1
-6
yd-gateway/src/main/java/com/yd/gateway/GatewayApplication.java
+21
-5
No files found.
yd-gateway/pom.xml
View file @
e4aa5a92
...
@@ -35,14 +35,9 @@
...
@@ -35,14 +35,9 @@
<groupId>
com.alibaba.cloud
</groupId>
<groupId>
com.alibaba.cloud
</groupId>
<artifactId>
spring-cloud-starter-alibaba-nacos-config
</artifactId>
<artifactId>
spring-cloud-starter-alibaba-nacos-config
</artifactId>
</dependency>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-web</artifactId>-->
<!-- </dependency>-->
<!-- 确保使用 WebFlux -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
flux
</artifactId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
...
...
yd-gateway/src/main/java/com/yd/gateway/GatewayApplication.java
View file @
e4aa5a92
package
com
.
yd
.
gateway
;
package
com
.
yd
.
gateway
;
import
com.yd.common.constant.ServerNameConstants
;
import
com.yd.common.constant.ServerNameConstants
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration
;
import
org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
/**
/**
* 网关启动程序
* 网关启动程序
*/
*/
@SpringBootApplication
(
scanBasePackages
=
"com.yd"
)
@SpringBootApplication
(
scanBasePackages
=
"com.yd"
,
exclude
=
{
// 排除 Spring MVC 相关自动配置
WebMvcAutoConfiguration
.
class
,
ErrorMvcAutoConfiguration
.
class
,
org
.
springframework
.
boot
.
autoconfigure
.
web
.
servlet
.
DispatcherServletAutoConfiguration
.
class
,
org
.
springframework
.
boot
.
autoconfigure
.
web
.
servlet
.
HttpEncodingAutoConfiguration
.
class
}
)
@EnableFeignClients
(
basePackages
=
"com.yd"
)
@EnableFeignClients
(
basePackages
=
"com.yd"
)
public
class
GatewayApplication
{
public
class
GatewayApplication
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
new
SpringApplicationBuilder
(
GatewayApplication
.
class
)
new
SpringApplicationBuilder
(
GatewayApplication
.
class
)
// .properties("spring.config.name:bootstrap", "config/bootstrap.yml")
.
properties
(
.
properties
(
"spring.application.name="
+
ServerNameConstants
.
ydGateway
)
"spring.application.name="
+
ServerNameConstants
.
ydGateway
,
// 强制设置响应式模式
"spring.main.web-application-type=reactive"
,
"spring.main.allow-bean-definition-overriding=true"
,
"spring.main.allow-circular-references=true"
)
.
build
().
run
(
args
);
.
build
().
run
(
args
);
System
.
out
.
println
(
"(♥◠‿◠)ノ゙ yd-gateway网关启动成功 ლ(´ڡ`ლ)゙ "
);
System
.
out
.
println
(
"(♥◠‿◠)ノ゙ yd-gateway网关启动成功 ლ(´ڡ`ლ)゙ "
);
}
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment