Class WebConfiguration

java.lang.Object
com.brodygaudel.bank.common.configuration.WebConfiguration

@Configuration public class WebConfiguration extends Object
Configuration class for Web-related settings.

This class defines configuration settings related to the web environment, such as Cross-Origin Resource Sharing (CORS). It includes a method to configure CORS for the application using the allowed origins and headers specified in the properties file.

See Also:
  • Configuration
  • Constructor Details

    • WebConfiguration

      public WebConfiguration()
  • Method Details

    • corsConfigurer

      @Bean public org.springframework.web.servlet.config.annotation.WebMvcConfigurer corsConfigurer()
      Configures CORS for the application.

      This method creates a WebMvcConfigurer bean to customize CORS settings. It allows requests from specified origins, headers, and methods. The configuration is retrieved from the application properties.

      Returns:
      The configured WebMvcConfigurer bean for CORS.