Commit 902c952a by 墨竹

fix:允许跨域

parent 170f6d9a
...@@ -101,5 +101,12 @@ ...@@ -101,5 +101,12 @@
</property> </property>
</bean> </bean>
<!-- 跨域配置 -->
<mvc:cors>
<mvc:mapping path="/**"
allowed-headers="*"
allowed-origins="*"
allowed-methods="GET,POST,PUT,DELETE,OPTIONS"
/>
</mvc:cors>
</beans> </beans>
\ No newline at end of file
...@@ -101,5 +101,13 @@ ...@@ -101,5 +101,13 @@
</property> </property>
</bean> </bean>
<!-- 跨域配置 -->
<mvc:cors>
<mvc:mapping path="/**"
allowed-headers="*"
allowed-origins="*"
allowed-methods="GET,POST,PUT,DELETE,OPTIONS"
/>
</mvc:cors>
</beans> </beans>
\ No newline at end of file
...@@ -62,14 +62,6 @@ ...@@ -62,14 +62,6 @@
</list> </list>
</property> </property>
</bean> </bean>
<!---->
<!--<bean id="conversionService" class="org.springframework.format.support.FormattingConversionServiceFactoryBean">-->
<!--<property name="converters">-->
<!--<set>-->
<!--<bean class="com.gic.commons.util.DateConverter"></bean>-->
<!--</set>-->
<!--</property>-->
<!--</bean>-->
<bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean"> <bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean">
<!-- 扩展名至mimeType的映射,即 /user.json => application/json --> <!-- 扩展名至mimeType的映射,即 /user.json => application/json -->
...@@ -102,5 +94,13 @@ ...@@ -102,5 +94,13 @@
</property> </property>
</bean> </bean>
<!-- 跨域配置 -->
<mvc:cors>
<mvc:mapping path="/**"
allowed-headers="*"
allowed-origins="*"
allowed-methods="GET,POST,PUT,DELETE,OPTIONS"
/>
</mvc:cors>
</beans> </beans>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment