springboot项目 解决跨域
时间: 2023-09-24 09:03:11 浏览: 121
解决SpringBoot项目中的跨域问题有几种方案。第一种是使用注解的方式,在对应的Controller方法上使用`@CrossOrigin`注解来实现跨域。这种方法简单快捷,但不适用于所有场景。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [SpringBoot项目针对跨域问题的三种解决方案](https://blog.csdn.net/nsnydnz/article/details/121073453)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [springboot项目解决跨域的几种方式](https://blog.csdn.net/u011174699/article/details/124177936)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文