springboot
少为人
这个作者很懒,什么都没留下…
展开
-
springboot使用springsecurity进行自定义权限路径配置
使用场景需要对用户访问的每一个路径进行权限配置。1.实现用户对应权限2.实现不同的路径需要不同权限3.实现用户登录刷新权限4.用户登出删除权限原创 2022-03-17 15:42:29 · 2224 阅读 · 0 评论 -
解决springboot jar包部署在linux系统上文件上传的问题
文件上传java代码 //上传图片 public int imagesUpload(MultipartFile files) throws IOException { String fileName = files.getOriginalFilename(); //获取项目路径 String src="static/images/auth/"; File directory = new File(s原创 2021-09-07 18:25:56 · 670 阅读 · 0 评论 -
springboot使用springsecurity权限访问配置
import org.springframework.beans.factory.annotation.Autowired;import org.springframework.context.annotation.Configuration;import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;import org.springframew.原创 2021-07-13 11:28:04 · 565 阅读 · 1 评论 -
springboot实现文件的上传到项目静态路径下(resource/static)和上传多个文件
springboot上传单个文件上传文件到两个不同的路径下,一个是项目路径,一个的项目编译路径,上传到编译路径下(target)文件可能会自动消失 @PostMapping("/uploadfile") @ResponseBody public String upload(@RequestParam("file") MultipartFile file) throws IOException { //如果文件不存在上传失败 if (file.isEmpty()) {原创 2021-06-24 18:42:35 · 3808 阅读 · 0 评论 -
SpingBoot 与Mybatis结合使用时出现Invalid bound statement (not found): xxx.xxx
出现错误的可能是配置文件和mapper层或者dao层对不上出现原因可能是:接口的名字和映射文件的名字相同,接口中方法的名字和要调用的映射文件中的标签的id相同。原创 2021-05-07 22:15:07 · 93 阅读 · 0 评论