|
@@ -1,6 +1,7 @@
|
|
|
package com.usky.demo;
|
|
|
|
|
|
|
|
|
+import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2;
|
|
|
import org.mybatis.spring.annotation.MapperScan;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -10,6 +11,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 springfox.documentation.swagger2.annotations.EnableSwagger2;
|
|
|
|
|
|
import java.net.InetAddress;
|
|
|
import java.net.UnknownHostException;
|
|
@@ -20,6 +22,8 @@ import java.net.UnknownHostException;
|
|
|
*/
|
|
|
|
|
|
|
|
|
+@EnableCustomSwagger2
|
|
|
+//@EnableSwagger2
|
|
|
@EnableFeignClients(basePackages = "com.usky")
|
|
|
@MapperScan(value = "com.usky.demo.mapper")
|
|
|
@ComponentScan("com.usky")
|
|
@@ -39,7 +43,7 @@ public class ApplicationRun
|
|
|
"Application is running! Access URLs:\n\t" +
|
|
|
"Local: \t\thttp://localhost:" + port + (null==path?"":path) + "/\n\t" +
|
|
|
"External: \thttp://" + ip + ":" + port + (null==path?"":path) + "/\n\t" +
|
|
|
- "Swagger-UI: \thttp://" + ip + ":" + port + (null==path?"":path) + "/swagger-ui.html\n\t" +
|
|
|
+ "Api: \t\thttp://" + ip + ":" + port + (null==path?"":path) + "/swagger-ui/index.html\n\t" +
|
|
|
"----------------------------------------------------------");
|
|
|
}
|
|
|
}
|