给定YAML片段
spring: cloud: gateway: globalcors: cors-configurations: '[/**]': allowedOrigins: "*"
我如何使用@Value("${spring.cloud.gateway.globalcors.cors-configurations.???.allowedOrigins")
@Value("${spring.cloud.gateway.globalcors.cors-configurations.???.allowedOrigins")
kpbwa7wx1#
尝尝这个
spring.cloud.gateway.globalcors.cors-configurations.'[/**]'.allowed-origins=* spring.cloud.gateway.globalcors.cors-configurations.'[/**]'.allowed-methods=HEAD,OPTIONS,GET,POST,PUT,PATCH spring.cloud.gateway.globalcors.cors-configurations.'[/**]'.allowed-headers=*
1条答案
按热度按时间kpbwa7wx1#
尝尝这个