- 博客(8)
- 收藏
- 关注
原创 SpringBoot2.3整合ElasticSearch7.6
SpringBoot2.3整合ElasticSearch7.6Elasticsearch下载地址 https://www.elastic.co/cn/downloads/elasticsearchkibana下载地址https://www.elastic.co/cn/downloads/kibanaelasticsearch-analysis-ik 下载地址https://github.com/medcl/elasticsearch-analysis-ik/releases前三小节简单介绍如何安装
2020-10-27 17:12:06 3265 2
原创 SpringBoot+Mybatis多模块(module)项目搭建
SpringBoot+Mybatis多模块(module)项目搭建开发工具及环境搭建IDE: IntelliJ IDEA 2020.1JDK: jdk1.8项目目录结构biz层:业务逻辑层dao层:数据持久层web层:请求处理层搭建步骤创建父工程① IDEA 工具栏选择菜单File ->New ->Project②选择Spring Initializr,start service URL默认选择Default,点击Next③填写输入框,点击Next④这步不
2020-10-10 17:45:01 759
原创 Java 8 Stream
Java 8 StreamJava 8 API添加了一个新的抽象称为流Stream,可以以一种声明的方式处理数据。这种风格将要处理的元素集合看作一种流, 流在管道中传输, 并且可以在管道的节点上进行处理, 比如筛选, 排序,聚合等。元素流在管道中经过中间操作的处理,最后由最终操作得到前面处理的结果。什么是 Stream?Stream(流)是一个来自数据源的元素队列并支持聚合操作元素是特定类型的对象,形成一个队列。 Java中的Stream并不会存储元素,而是按需计算。数据源 流的来源。 可以
2021-06-17 17:57:30 249
原创 SpringBoot+Shiro中使用Redis的两种缓存方案
SpringBoot+Shiro中使用Redis的两种缓存方案Shiro中的缓存(Realm)导入依赖<dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-spring-boot-web-starter</artifactId> <version>1.6.0</version></dependency>
2020-10-21 15:40:29 835
原创 将Shiro集成到Spring-Boot工程中
将Shiro集成到Spring-Boot工程中 Shiro官网文档:https://shiro.apache.org/spring-boot.html导入依赖<dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-spring-boot-web-starter</artifactId> <version>1.6.0&l
2020-10-17 18:28:32 377 2
原创 解决IDEA下SpringBoot中thymeleaf无法热部署
解决IDEA下SpringBoot中thymeleaf无法热部署①在配置文件application.yml中添加#关闭thymeleaf缓存spring: thymeleaf: cache: false或在application.properties中添加spring.thymeleaf.cache=false②添加Maven依赖<dependency> <groupId>org.springframework.boot</groupId&
2020-10-12 13:24:54 488
原创 Spring MVC中的文件上传
Spring MVC中的文件上传前端的form表单需要注意:method = “post"encrytype=“multipart/form-data”Spring里的配置默认情况下,Spring MVC 的 MultipartResolver 组件,并没有配置在Spring容器中(DispatcherServlet就不会使用)要想处理文件上传的请求,需要自己向容器中注册 该组件要求: bean的名称必须是 “multipartResolver” ,类型必须是 ``Multipar
2020-10-10 17:59:48 72
原创 Spring MVC中的文件下载
@Autowired private WebApplicationContext applicationContext; @RequestMapping("/demo2") public ResponseEntity<byte[]> demo2() throws IOException { //固定获取服务器上某个文件的IO流。 通过 ServletContext对象。 ServletContext servletContext...
2020-10-10 17:56:43 58
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人