![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java
如影随从
这个作者很懒,什么都没留下…
展开
-
Spring Mvc处理CORS跨域问题
对于前端来说,跨域问题会经常遇到,前端有很多的处理方法,例如JSONP 就是使用的比较多的方案,但 JSONP 是一个非官方的跨域协议同时也只支持 GET 请求。所以这里就使用CORS处理跨域。这种处理方式,将工作完全交付给了后台java层去做了。下面简单说明下使用的步骤:1、在web.xml中添加如下代码:<filter> <filter-name>cors</filter-name> <filter-class>myCORSFi.原创 2021-08-26 18:05:01 · 552 阅读 · 0 评论 -
Java学习笔记整理
1、java获取文件扩展名的方法import java.io.*;public class FileTest{ public static void main(String args[]){ File f =new File("TileTest.doc"); String fileName=f.getName(); String prefix=fil原创 2016-05-05 17:44:46 · 391 阅读 · 0 评论