摘要: 准备工作 数据库 CREATE TABLE `tb_user` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID', `username` varchar(255) DEFAULT NULL COMMENT '用户名', `passwor 阅读全文
posted @ 2023-08-03 18:27 Mountain_SY 阅读(11) 评论(0) 推荐(0) 编辑
摘要: mybatis 逆向工程使用方法 springboot 整合 mybtis 逆向工程,我使用的是 idea,springboot,maven,eclipse 的同理。 1、添加所需插件和 jar 包 <plugin> <groupId>org.mybatis.generator</groupId> 阅读全文
posted @ 2023-08-03 18:11 Mountain_SY 阅读(60) 评论(0) 推荐(0) 编辑
摘要: SpringBoot 实现文件上传,图片上传并显示功能 我这里使用的是 springboot 2.0.3,不需要导入相关 jar 包,2.x 的版本已经整合进去了,直接使用即可。 spring 官网提供了 springboot 的文件上传下载案例,这是网址:https://spring.io/gui 阅读全文
posted @ 2023-08-03 17:49 Mountain_SY 阅读(317) 评论(0) 推荐(0) 编辑
摘要: springboot 配置本地资源映射路径需要配置一下映射资源位置,当时 springboot1.x 和 spring 波特 2.x 的配置方法不同,这里就分开记录一下配置过程。 1、springboot 1.x 配置 @Configuration public class MyWebMvcConf 阅读全文
posted @ 2023-08-03 17:11 Mountain_SY 阅读(295) 评论(0) 推荐(0) 编辑
摘要: springboot1.x 和 springboot2.x 配置拦截器区别就在于注册拦截器的方式不同,springboot1.x 配置方法是: public class WebAppConfig extends WebMvcConfigurerAdapter { springboot2.x 配置方法 阅读全文
posted @ 2023-08-03 17:01 Mountain_SY 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 一、idea 配置 springboot 热启动方法 1、添加 spring-boot-devtools 的包,true必须加上。 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dev 阅读全文
posted @ 2023-08-03 16:33 Mountain_SY 阅读(491) 评论(0) 推荐(0) 编辑
摘要: springboot 整合 jsp 页面 创建 springboot 项目就不废话了。在原来的基础上直接加东西就可以了 1、添加 jsp 支持的 jar 包 <!-- servlet 依赖 --> <dependency> <groupId>javax.servlet</groupId> <arti 阅读全文
posted @ 2023-08-03 16:15 Mountain_SY 阅读(68) 评论(0) 推荐(0) 编辑