dnet-applications/apps/bioschemas-api/src/main/java/eu/dnetlib/bioschemas/api/MainApplication.java

37 lines
1009 B
Java

package eu.dnetlib.bioschemas.api;
import org.springdoc.core.GroupedOpenApi;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import eu.dnetlib.common.app.AbstractDnetApp;
@SpringBootApplication
@EnableCaching
@EnableScheduling
@ComponentScan(basePackages = "eu.dnetlib")
public class MainApplication extends AbstractDnetApp {
public static void main(final String[] args) {
SpringApplication.run(MainApplication.class, args);
}
@Bean
public GroupedOpenApi publicApi() {
return GroupedOpenApi.builder()
.group("D-Net Bioschemas Service APIs")
.pathsToMatch("**/api/**")
.build();
}
@Override
protected String swaggerTitle() {
return "D-Net Bioschemas Service APIs";
}
}