Commit d33188a5 by zhangxingmin

push

parent e4aa5a92
package com.yd.gateway;
import com.yd.common.constant.ServerNameConstants;
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.cloud.openfeign.EnableFeignClients;
/**
* 网关启动程序
*/
@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
}
)
@SpringBootApplication(scanBasePackages = "com.yd")
@EnableFeignClients(basePackages = "com.yd")
public class GatewayApplication {
public static void main(String[] args) {
new SpringApplicationBuilder(GatewayApplication.class)
.properties(
"spring.application.name=" + ServerNameConstants.ydGateway,
// 强制设置响应式模式
"spring.main.web-application-type=reactive",
"spring.main.allow-bean-definition-overriding=true",
"spring.main.allow-circular-references=true"
)
.properties("spring.application.name="+ ServerNameConstants.ydGateway)
.build().run(args);
System.out.println("(♥◠‿◠)ノ゙ yd-gateway网关启动成功 ლ(´ڡ`ლ)゙ ");
}
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment