added host and basePath for swagger
This commit is contained in:
parent
bc49f6e280
commit
2015ea5bd8
|
@ -1,5 +1,6 @@
|
|||
package eu.dnetlib.data.mdstore.manager;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
|
@ -16,13 +17,22 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
|||
@EnableCaching
|
||||
public class MainApplication extends AbstractDnetApp {
|
||||
|
||||
@Value("${dhp.swagger.api.host}")
|
||||
private String swaggetHost;
|
||||
|
||||
@Value("${dhp.swagger.api.basePath}")
|
||||
private String swaggerPath;
|
||||
|
||||
public static void main(final String[] args) {
|
||||
SpringApplication.run(MainApplication.class, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configSwagger(final Docket docket) {
|
||||
docket.select()
|
||||
docket
|
||||
.host(swaggetHost)
|
||||
.pathMapping(swaggerPath)
|
||||
.select()
|
||||
.apis(RequestHandlerSelectors.any())
|
||||
.paths(p -> p.startsWith("/mdstores"))
|
||||
.build()
|
||||
|
|
|
@ -29,3 +29,6 @@ dhp.mdstore-manager.hdfs.base-path = /data/dnet.dev/mdstore
|
|||
dhp.mdstore-manager.hadoop.user = dnet.dev
|
||||
|
||||
dhp.mdstore-manager.inspector.records.max = 1000
|
||||
|
||||
dhp.swagger.api.host = localhost
|
||||
dhp.swagger.api.basePath = /
|
||||
|
|
Loading…
Reference in New Issue