Last active
August 29, 2015 14:22
-
-
Save sdeleuze/aa8f965176c0c0194bc9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//########################### registry.map() ############################### | |
@Configuration | |
@EnableWebMvc | |
public class WebConfig extends WebMvcConfigurerAdapter { | |
@Override | |
public void addInterceptors(InterceptorRegistry registry) { | |
registry.addInterceptor(...); | |
} | |
@Override | |
public void addCorsMappings(CorsRegistry registry) { | |
registry.map("/api/**"); | |
} | |
} | |
//########################### registry.addMapping() ############################### | |
@Configuration | |
@EnableWebMvc | |
public class WebConfig extends WebMvcConfigurerAdapter { | |
@Override | |
public void addInterceptors(InterceptorRegistry registry) { | |
registry.addInterceptor(...); | |
} | |
@Override | |
public void addCorsMappings(CorsRegistry registry) { | |
registry.addMapping("/api/**"); | |
} | |
} | |
//########################### registry.addCorsMappings() ############################### | |
@Configuration | |
@EnableWebMvc | |
public class WebConfig extends WebMvcConfigurerAdapter { | |
@Override | |
public void addInterceptors(InterceptorRegistry registry) { | |
registry.addInterceptor(...); | |
} | |
@Override | |
public void addCorsMappings(CorsRegistry registry) { | |
registry.addCorsMapping("/api/**"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment