Commit db16110d authored by suhuiguang's avatar suhuiguang

1.异常捕获处理

parent 75dddf8e
......@@ -13,6 +13,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;
import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
import java.net.InetAddress;
import java.net.UnknownHostException;
......@@ -43,6 +44,7 @@ public class AmosStatisticsApplication {
ConfigurableApplicationContext context = SpringApplication.run(AmosStatisticsApplication.class, args);
Environment env = context.getEnvironment();
GlobalExceptionHandler.setAlwaysOk(true);
String ip = InetAddress.getLocalHost().getHostAddress();
String port = env.getProperty("server.port");
String path = oConvertUtils.getString(env.getProperty("server.servlet.context-path"));
......
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