2017-12-15 11:05:51 +01:00
|
|
|
package eu.eudat;
|
|
|
|
|
2023-10-11 16:53:12 +02:00
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
2017-12-15 11:05:51 +01:00
|
|
|
import org.springframework.boot.SpringApplication;
|
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
2023-10-04 11:46:06 +02:00
|
|
|
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
2018-01-17 13:03:51 +01:00
|
|
|
import org.springframework.boot.builder.SpringApplicationBuilder;
|
2021-06-29 13:33:57 +02:00
|
|
|
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
2023-10-11 16:53:12 +02:00
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
|
import org.springframework.context.annotation.Primary;
|
2023-12-05 10:32:17 +01:00
|
|
|
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
|
2018-10-02 16:33:58 +02:00
|
|
|
import org.springframework.scheduling.annotation.EnableAsync;
|
2017-12-15 11:05:51 +01:00
|
|
|
|
2024-02-13 11:22:11 +01:00
|
|
|
import java.util.Map;
|
|
|
|
|
2023-10-11 16:53:12 +02:00
|
|
|
@SpringBootApplication(scanBasePackages = {
|
|
|
|
"eu.eudat",
|
|
|
|
"eu.eudat.depositinterface",
|
|
|
|
"gr.cite",
|
|
|
|
"gr.cite.tools",
|
2023-12-18 17:23:37 +01:00
|
|
|
"gr.cite.commons",
|
|
|
|
"eu.eudat.controllers.controllerhandler"
|
2023-10-11 16:53:12 +02:00
|
|
|
})
|
2023-11-08 12:37:16 +01:00
|
|
|
@EntityScan({
|
|
|
|
"eu.eudat.data"})
|
2018-10-02 16:33:58 +02:00
|
|
|
@EnableAsync
|
2018-01-17 13:03:51 +01:00
|
|
|
public class EuDatApplication extends SpringBootServletInitializer {
|
2023-10-11 16:53:12 +02:00
|
|
|
@Bean
|
|
|
|
@Primary
|
2023-12-05 11:52:59 +01:00
|
|
|
public ObjectMapper primaryObjectMapper(Jackson2ObjectMapperBuilder builder) {
|
|
|
|
return builder.modulesToInstall(new JavaTimeModule()).build();
|
2023-10-11 16:53:12 +02:00
|
|
|
}
|
|
|
|
|
2018-01-31 16:39:16 +01:00
|
|
|
@Override
|
2018-01-17 13:03:51 +01:00
|
|
|
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
|
|
|
|
return builder.sources(EuDatApplication.class);
|
2018-01-31 16:39:16 +01:00
|
|
|
}
|
2017-12-15 17:57:41 +01:00
|
|
|
|
2017-12-15 11:05:51 +01:00
|
|
|
public static void main(String[] args) {
|
|
|
|
SpringApplication.run(EuDatApplication.class, args);
|
|
|
|
}
|
|
|
|
}
|