| | |
| | | |
| | | /** |
| | | * 路由配置信息 |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Configuration |
| | | public class RouterFunctionConfiguration { |
| | | |
| | | |
| | | /** |
| | | * 这里为支持的请求头,如果有自定义的header字段请自己添加 |
| | | */ |
| | |
| | | private static final String ALLOWED_ORIGIN = "*"; |
| | | private static final String ALLOWED_EXPOSE = "*"; |
| | | private static final String MAX_AGE = "18000L"; |
| | | |
| | | |
| | | @Autowired |
| | | private ValidateCodeHandler validateCodeHandler; |
| | | |
| | | |
| | | @SuppressWarnings("rawtypes") |
| | | @Bean |
| | | public RouterFunction routerFunction() { |
| | |
| | | RequestPredicates.GET("/code").and(RequestPredicates.accept(MediaType.TEXT_PLAIN)), |
| | | validateCodeHandler); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跨域配置 |
| | | */ |