Package org.tweetyproject.web.services
Class RestServiceCorsApplication
java.lang.Object
org.tweetyproject.web.services.RestServiceCorsApplication
Main class for starting the REST service with Cross-Origin Resource Sharing (CORS) support.
The class configures CORS to allow requests only from specific origins for different endpoints.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
Configuration method for CORS support in the application.static void
Main method that starts the Spring Boot application and logs the allowed origins.
-
Constructor Details
-
RestServiceCorsApplication
public RestServiceCorsApplication()
-
-
Method Details
-
main
Main method that starts the Spring Boot application and logs the allowed origins. It also sets up necessary configurations and initializes the Spring context.- Parameters:
args
- Command line arguments passed during the start of the application.
-
corsConfigurer
@Bean public org.springframework.web.servlet.config.annotation.WebMvcConfigurer corsConfigurer()Configuration method for CORS support in the application.- Returns:
- A WebMvcConfigurer instance that configures CORS settings.
-