摘要: 1 修改pom文件 2 创建Ehcache的配置文件 文件名:ehcache.xml 位置:src/main/resources/ehcache.xml <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noName 阅读全文
posted @ 2019-12-09 16:53 李jojo 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 1.创建一个maven项目 2.导入SpringBoot相关的依赖 3.编写主程序,启动SpringBoot应用 4.编写相关的Controller 5.运行主程序测试 6.SpringBoot简化部署 阅读全文
posted @ 2019-12-09 15:26 李jojo 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 一,访问静态资源 1. SpringBoot从classpath/static的目录 注意目录名称必须是static 1. ServletContext根目录下 在src/main/webapp 目录名称必须要webapp 一,文件上传 1. 编写Controller 2 编写启动类 3. 设置上传 阅读全文
posted @ 2019-12-09 10:06 李jojo 阅读(573) 评论(0) 推荐(0) 编辑
摘要: 1 整合servlet 通过注解扫描完成servlet组件的注册 1.1编写servlet 1.2编写启动类 @WebServlet(name="FirstServlet",urlPatterns="/first") @SpringBootApplication @ServletComponentS 阅读全文
posted @ 2019-12-09 09:44 李jojo 阅读(1659) 评论(0) 推荐(0) 编辑