目录

springboot中利用Ajax进行前后端交互

springboot中利用Ajax进行前后端交互

https://i-blog.csdnimg.cn/blog_migrate/45a487461d5860660f4ff0b48d647001.png

https://i-blog.csdnimg.cn/blog_migrate/41ee2e95f5d2b59e4c71765f7101c5b3.png

https://i-blog.csdnimg.cn/blog_migrate/7a88ff057ccef02c918b09a8ec5ca0e0.png

debug发现后端controller能接收到数值。

https://i-blog.csdnimg.cn/blog_migrate/a4180821d662b3eaeb4e600ec6001ab7.png

我代码中本想用 Integer number = Integer.getInteger(pageNumber);把前端传来的pageNumber 变换成int类型,结果numbe一直r为null

https://i-blog.csdnimg.cn/blog_migrate/7a6259cefeb962083ec9b9ee879d6420.png

https://i-blog.csdnimg.cn/blog_migrate/777d1b82268b314beed5e408f47648d3.png

https://i-blog.csdnimg.cn/blog_migrate/060290aeb152b125e96fd8307dece2af.png

页面能正常接收到返回的List数据!