Class RestServiceCorsApplication

java.lang.Object
org.tweetyproject.web.services.RestServiceCorsApplication

@SpringBootApplication public class RestServiceCorsApplication extends Object
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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.web.servlet.config.annotation.WebMvcConfigurer
    Configuration method for CORS support in the application.
    static void
    main(String[] args)
    Main method that starts the Spring Boot application and logs the allowed origins.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RestServiceCorsApplication

      public RestServiceCorsApplication()
  • Method Details

    • main

      public static void main(String[] args)
      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.