
springboot
sniperの博客
这个作者很懒,什么都没留下…
展开
-
File.separator用法,路径分隔符
最近项目中用到了分隔符,就是写一个路径,路径的分隔符在win和Linux中都可以通用,经过查资料,发现可以使用File.separator来解决。比如在win中String path = "E:\temp\a.txt"在Linux中String path = "E:/temp/a.txt"如果想在两个系统中通用,使用File.separatorString path = "E:"+File.separator+"temp"+File.separator+"a.txt"...原创 2021-06-30 10:00:07 · 819 阅读 · 0 评论 -
Mybatis-Plus分页插件
//mybatis-plus 分页插件 @Bean public PaginationInterceptor paginationInterceptor() { PaginationInterceptor paginationInterceptor = new PaginationInterceptor(); // 设置请求的页面大于最大页后操作, true调回到首页,false 继续请求 默认false // paginationInte.原创 2021-06-21 17:06:39 · 237 阅读 · 0 评论 -
跨域配置文件
package com.mbf.tianjin.config;import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import org.springframework.web.cors.CorsConfiguration;import org.springframework.web.cors.UrlBasedCorsConfig.原创 2021-06-21 17:03:36 · 141 阅读 · 0 评论