
springboot
清幽子
Striving upwards is a good habit
展开
-
springboot整合security,swagger2页面
在这里插入代码片引入依赖 <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId> <version>2.6.1</version> </dependency> <depende原创 2021-09-01 09:12:06 · 329 阅读 · 0 评论 -
springboot引入富文本编辑器
首先用链接引入wangEditor,<head> <meta charset="UTF-8"> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/wangeditor@latest/dist/wangEditor.min.js" ></script> <title>发布文章</tit原创 2021-07-14 14:26:03 · 235 阅读 · 0 评论 -
springboot中的HTML页面作为组件使用
用Thymeleaf进行组件调用。首先在想要作为组件的HTML中,头部在HTML标签中引入thymeleaf链接,在head标签中使用到的标签是 th:fragment = “ id( valueOne , valueTwo)”,在HTML文件中,将有可能多个地方出现的元素块,用 fragment 包裹起来<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf原创 2021-07-13 12:33:50 · 261 阅读 · 0 评论 -
springboot连接数据库,写注册页面
1.首先在SpringbootBlogApplication加入@MapperScan注解@MapperScan("com.blog.mapper")@SpringBootApplicationpublic class SpringbootBlogApplication { public static void main(String[] args) { SpringApplication.run(SpringbootBlogApplication.class, args);原创 2021-05-29 21:12:22 · 480 阅读 · 0 评论 -
security自定义登录页面
1.首先登录页面form表单,要写上action连接,提交方式必须为post注意事项:action链接与@RequestMapping一致input要写name属性,后端才获取到数据,也是为了得到下面的参数http.formLogin().usernameParameter(“username”).passwordParameter(“password”)注意button的type属性是submit,不是button,否则点击会没反应 <!--登录页面--> <原创 2021-05-25 21:46:17 · 1212 阅读 · 1 评论 -
security自定义数据库类型的认证与授权
登录页面地址1.建立数据库create table users(id bigint(20) not null primary key AUTO_INCREMENT,username varchar(50) not null,password varchar(50) not null,roles text);2.填入数据INSERT INTO `users`(`id`, `username`, `password`, `roles`) VALUES (1, 'admin', '12', 'ROL.原创 2021-05-25 21:30:34 · 357 阅读 · 0 评论 -
springboot整合redis时报错:Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnect。
在网上试了好多,更改redis.windows.conf文件的方法没有效果,最后发现在打开redis-server.exe出现闪退,然后寻找解决原因,发现是之前设置了密码,然后没有输密码,直接启动,导致出错。解决:在redis.windows.conf文件中,将# requirepass foobared解注,并重新设置密码requirepass 123456然后在Windows黑窗口中,切换到redis文件夹目录,之后输入下面命令启动redis-server.exe redis.win原创 2021-05-05 16:20:44 · 4284 阅读 · 1 评论