Snippets Collections
	@Bean
	public WebMvcConfigurer corsConfigurer() {
		return new WebMvcConfigurer() {
			@Override
			public void addCorsMappings(CorsRegistry registry) {
				registry.addMapping("/**").allowedOrigins("http://localhost:4200").allowedMethods("*").allowedHeaders("*");
			}
		};
	}
	
}
@RequestMapping(produces = [MediaType.TEXT_HTML_VALUE, CustomMediaType.TURBO_STREAM_VALUE])
suspend fun pinger(model: Model): String {
    model.addAttribute("pingTime", pingService.ping(hostname, port))
    return "ping.turbo-stream"
}
star

Wed Oct 20 2021 02:01:31 GMT+0000 (UTC) https://yoandroide.xyz/configuracion-de-cors-en-un-proyecto-spring-boot/

#springframework #spring #boot
star

Wed Jun 23 2021 05:25:12 GMT+0000 (UTC) undefined

#springframework
star

Mon Jan 18 2021 05:24:39 GMT+0000 (UTC)

#kotlin #springframework

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension