2023-02-06 15:53:07 +01:00
|
|
|
package eu.dnetlib;
|
2022-06-14 13:59:31 +02:00
|
|
|
|
2022-11-16 10:41:55 +01:00
|
|
|
import org.springdoc.core.GroupedOpenApi;
|
2022-06-14 13:59:31 +02:00
|
|
|
import org.springframework.boot.SpringApplication;
|
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
|
import org.springframework.cache.annotation.EnableCaching;
|
2022-11-16 10:41:55 +01:00
|
|
|
import org.springframework.context.annotation.Bean;
|
2022-06-14 13:59:31 +02:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2022-11-16 10:41:55 +01:00
|
|
|
@Bean
|
|
|
|
public GroupedOpenApi publicApi() {
|
|
|
|
return GroupedOpenApi.builder()
|
|
|
|
.group("D-Net Information Service API")
|
|
|
|
.pathsToMatch("/api/**")
|
|
|
|
.build();
|
|
|
|
}
|
|
|
|
|
2022-06-14 13:59:31 +02:00
|
|
|
@Override
|
2022-11-16 10:41:55 +01:00
|
|
|
protected String swaggerTitle() {
|
|
|
|
return "D-Net Information Service APIs";
|
2022-06-14 13:59:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|