package com.github.openweather

import com.github.openweather.business.CurrentWeather
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
import org.springframework.web.servlet.config.annotation.CorsRegistry




@Configuration
open class WebConfiguration : WebMvcConfigurerAdapter() {
    @Bean
    open fun currentWeather(): CurrentWeather {
        return CurrentWeather()
    }

//    override fun addCorsMappings(registry: CorsRegistry?) {
//        registry!!.addMapping("/**")
////                .allowedOrigins("http://localhost:3000")
//                .allowedOrigins("*")
//    }

}