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
d33188a5
Commit
d33188a5
authored
Nov 12, 2025
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
e4aa5a92
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
21 deletions
+4
-21
yd-gateway/src/main/java/com/yd/gateway/GatewayApplication.java
+4
-21
No files found.
yd-gateway/src/main/java/com/yd/gateway/GatewayApplication.java
View file @
d33188a5
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
(
@SpringBootApplication
(
scanBasePackages
=
"com.yd"
)
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
(
.
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