package com.dli;


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan
@EnableAutoConfiguration
public class SmileApplication {

    public static void main(String[] args) {
        SpringApplication.run(SmileApplication.class, args);
    }

}

@@ -130,24 +130,76 @@
 figuration;%0A
+import org.springframework.context.annotation.Bean;%0A
 import org.s
@@ -307,16 +307,190 @@
 uration;
+%0Aimport org.springframework.web.cors.CorsConfiguration;%0Aimport org.springframework.web.cors.UrlBasedCorsConfigurationSource;%0Aimport org.springframework.web.filter.CorsFilter;
 %0A%0A@Confi
@@ -684,10 +684,609 @@
 %0A    %7D%0A%0A
+    private CorsConfiguration buildConfig() %7B%0A        CorsConfiguration corsConfiguration = new CorsConfiguration();%0A        corsConfiguration.addAllowedOrigin(%22*%22);%0A        corsConfiguration.addAllowedHeader(%22*%22);%0A        corsConfiguration.addAllowedMethod(%22*%22);%0A        return corsConfiguration;%0A    %7D%0A%0A    /**%0A     * %E8%B7%A8%E5%9F%9F%E8%BF%87%E6%BB%A4%E5%99%A8%0A     * @return%0A     */%0A    @Bean%0A    public CorsFilter corsFilter() %7B%0A        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();%0A        source.registerCorsConfiguration(%22/**%22, buildConfig()); // 4%0A        return new CorsFilter(source);%0A    %7D%0A%0A
 %7D%0A

add cross domain function