package com.tzld.ffmpeg; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.tzld.ffmpeg.interceptor.CrosDomainAllowInterceptor; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @SpringBootApplication @ServletComponentScan("com.tzld.ffmpeg.controller") @EnableDiscoveryClient @EnableFeignClients public class Application implements WebMvcConfigurer { private static final Logger LOGGER = LoggerFactory.getLogger(Application.class); public static void main(String[] args) { SpringApplication.run(Application.class, args); LOGGER.info("ffmpeg-server Start Success"); } @Override public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor(new CrosDomainAllowInterceptor()).addPathPatterns("/**"); } }