Springboot Study
梁晨le
社会大学研究员
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
springboot-vue 实现文件上传
放假第一天,从学会上传文件开始。首先创建一个springboot文件项目创建controller内容如下:package com.example.fileupload;import org.springframework.web.bind.annotation.CrossOrigin;import org.springframework.web.bind.annotation.PostMapping;import org.springframework.web.bind.annot原创 2020-12-28 10:30:45 · 304 阅读 · 0 评论 -
NewBee商城:前端部分提示错误 th:href传参报错
传参时出现错误提示如下:'#', '(', '-', '.', '/', ':', '=', ESCAPED_STRING_LITERAL, FLOATING_POINT_LITERAL, IDENTIFIER, INTEGER_LITERAL, STRING_IDENTIFIER, STRING_LITERAL, '{', '|' or '}' expected, got '?'修改前:修改后:修改前:修改后:我是12-19号git下来的代码 导入项目...原创 2020-12-11 16:16:56 · 1005 阅读 · 0 评论 -
Java:验证码生成器(2020-11-17)
在做登录界面的时候突然想到加个验证码是不是显得高大上一点,所以想了想就加了,用的时候之接生成验证码就可以了。代码如下:import java.awt.*;import java.awt.image.BufferedImage;import java.util.Random;/** * 验证码生成器 * * @author lc */public class CpachaUtil { /** * 验证码来源 */ final private char[] code原创 2020-11-16 20:51:05 · 744 阅读 · 1 评论 -
@RequestMapping 变种注解的使用 -- @GetMapping ,@Postmapping ,@PutMapping ,@DeleteMapping @PatchMapping
注解: 了解这些注解之前 先讨论一下 get 和 post 的区别: 最直观的区别就是GET把参数包含在URL中,POST 通过Request Body传递参数。 个人开发过程中查询用GET,其他用POST,写业务的时候 一般没参数用 GET , 有参数用 POST :通过 RequestBody传递参数 首先,什么情况下是 get 请求呢: 直接在浏览器地址栏输入某个地址 表单默认的提交方式 什么...原创 2020-10-28 15:46:06 · 1061 阅读 · 0 评论 -
Windows10 配置tomcat8(2020.10.21)最新
1、创建vue项目之前,要先下载node.js,点击这里https://nodejs.org/en/然后配置node.js的环境,推荐这里https://www.cnblogs.com/coder-lzh/p/9232192.html配置好后 在cmd中输入 node -v 检测是否配置成功出现版本号,即安装成功在输入 npm -v 检查版本号之后 输入npm -g install npm,将 npm 更新至最新版本...原创 2020-10-21 17:13:45 · 346 阅读 · 0 评论 -
springboot整合jpa 以及日志输出打印SQL语句和传入的参数
先说springboot整合jpaPA(java persistence api),它并不是一个框架,而是一组规范。其中,Hibernate就实现了这个规范,而且是相当成功的(其实TopLink和OpenJPA也都实现了JPA规范,不过它们被Hinernate的光环笼罩了)。所以呢,当我们说到JPA的时候,好多人首先想到的就是Hibernate。一,创建工程时把依赖添加上二,配置yml文件########springboot整合jpa配置spring: devtools: .原创 2020-10-14 19:54:41 · 8879 阅读 · 1 评论 -
mybatis控制台打印日志
properties文件配置粉色部分是mapper包名,替换即可logging.level.com.lc.mapper=debugyml文件配置logging: level: cn.com.xxx.xxx.mapper: debug #打印sql原创 2020-10-14 16:14:36 · 616 阅读 · 0 评论 -
2020整合springboot+shiro权限认证
整合springboot+shiro1,配置文件1.1 pom.xml配置<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.原创 2020-10-13 21:20:48 · 293 阅读 · 0 评论 -
Cannot resolve method ‘setAttribute
学习shiro的时候,取Session里面的用户值的时候出现找不到setAttribute这个方法最后发现是引错Session了,整合shiro应该用这个import org.apache.shiro.session.Session;原创 2020-10-13 18:26:03 · 347 阅读 · 0 评论 -
在写springboot项目登录时,页面返回只有head内容没有body内容
SpringBoot 项目 在使用thymeleaf(如果使用的jsp模板也一样)的时候 已经配置了视图解析器 但是在controller层返回页面的时候 始终返回的是字符串阐释一下 关于@ResponseBody这个注解作用:该注解用于将Controller的方法返回的对象,通过适当的HttpMessageConverter转换为指定格式后,写入到Response对象的body数据区。使用时机:返回的数据不是html标签的页面,而是其他某种格式的数据时(如json、xml等)使用...原创 2020-10-10 10:17:45 · 661 阅读 · 3 评论 -
2020 错误记录:Error resolving template [users], template might not exist or might not be accessible ...
今天写登录验证的时候出现错误如下:Error resolving template [users], template might not exist or might not be accessible by any of the configured Template Resolvers简单表述:控制台出现了这个异常:Error resolving template "xxx", template might not exist or might not be accessible by any原创 2020-10-10 09:57:55 · 1475 阅读 · 0 评论 -
spring boot+thymeleaf 文件上传,下载功能实现
1,pom.xml文件添加thymeleaf依赖<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency>properties文件设置thymeleaf# thymeleafspr原创 2020-10-08 21:46:00 · 1413 阅读 · 0 评论 -
Springboot+Thymeleaf 整合(2020最新)
本文章适合刚开始学习springboot的小伙伴;1,建一个springboot项目,目录结如下:配置pom.xml,添加thymeleaf依赖<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId></depe原创 2020-10-08 13:58:46 · 499 阅读 · 0 评论 -
Error resolving template [index], template might not exist or might not be accessible by...
我这个问题是由thymeleaf报出的。thymeleaf原因是thymeleaf的默认路径是/thymeleaf/这个文件,而我要映射到的是webapp下面最直接的index.html,也就是/的目录下。在/thymeleaf/当然找不到。我的解决方法为修改.yml或者properties文件中thymeleaf的prefix设置,让它匹配到正确的路径下...原创 2020-10-08 10:46:43 · 1612 阅读 · 0 评论 -
端口占用:The Tomcat connector configured to listen on port 8080 failed to start. The port may..
8080端口占用,先查询8080的pid码win+r 输入cmd 打开命令行窗口输入netstat -ano找到8080端口对应的pid码 这里是15624输入 tasklist | findstr "15624" 找到占用此端口的程序通过 taskkill /f /t /im java.exe 终止进程如果终止不了,使用管理员权限进入cmd即可...原创 2020-10-06 21:44:59 · 289 阅读 · 0 评论 -
There is no configured/running web-servers found! Please...(springboot +jsp)
出现这个错误的原因有好多种,这里借鉴一下优秀哥的https://blog.youkuaiyun.com/IT_TIfarmer/article/details/84626147继续往下走,如果此时出现There was an unexpected error (type=Not Found, status=404). /kind/WEB-INF/page//kindEditor.jsp的错误移步这位老哥博客https://blog.youkuaiyun.com/qq_23184291/article/details/78402原创 2020-10-06 10:27:00 · 1142 阅读 · 0 评论 -
fastjson出现中文乱码问题解决方法
Springboot-Fastjson测试1,在pom.xml文件中添加依赖<dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.47</version></dependency>2,Applicat原创 2020-10-05 15:51:55 · 6855 阅读 · 2 评论 -
PageHelper分页查询
PageHeiper分页1,pom.xml添加依赖 <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>1.2.5</version> </depend原创 2020-10-04 20:36:22 · 368 阅读 · 0 评论 -
Springboot+mybatis 整合(详细步骤,源码等下方github链接)
Springboot+mybatis 整合(适合新手)1,配置pom.xml文件,application.propertiespom.xml配置<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:sc原创 2020-10-03 18:29:21 · 1082 阅读 · 0 评论 -
Springboot devtools的配置详解
devtoolsspring为开发者提供了一个名为spring-boot-devtools的模块来使Spring Boot应用支持热部署,提高开发者的开发效率,无需手动重启Spring Boot应用。深层原理是使用了两个ClassLoader,一个Classloader加载那些不会改变的类(第三方Jar包),另一个ClassLoader加载会更改的类,称为restart ClassLoader,这样在有代码更改的时候,原来的restart ClassLoader 被丢弃,重新创建一个restart.原创 2020-10-03 14:22:03 · 5835 阅读 · 0 评论
分享