
Spring Boot
hdn_kb
这个作者很懒,什么都没留下…
展开
-
SpringBoot中实现定时任务
文章目录SpringBoot中实现定时任务(一)在启动类上添加@EnableScheduling注解编写定时任务SpringBoot中实现定时任务(二)编写定时任务SpringBoot中实现定时任务(一)在启动类上添加@EnableScheduling注解@EnableScheduling注解:用来开启定时任务的功能package com.hdn.schedule;import org.springframework.boot.SpringApplication;import org.spri原创 2020-11-20 16:00:20 · 294 阅读 · 0 评论 -
SpringBoot项目中使用CXF发布和调用webservice接口
文章目录1. 服务端发布webservice接口1.1. 引入依赖1.2. 编写接口1.3. 实现接口1.4. 发布webservice接口1.5. 发布多个webservice接口1.6. 测试1.7. 问题2. 客户端调用webservice接口2.1. 问题1. 服务端发布webservice接口1.1. 引入依赖<!-- CXF webservice --> <dependency> <groupId>org.apache.cxf&l原创 2020-11-18 21:13:11 · 2528 阅读 · 2 评论 -
以Redis作为缓存技术,使用SpringBoot、MyBatisPlus来演示@Cacheable、@CachePut、@CacheEvit注解
一、知识点1、redis是什么? key-value的nosql数据库,先存到内存中,会根据一定的策略持久化到磁盘。2、主要作用有哪些? 主要用来做缓存数据库和web集群时当做中央缓存存放session。3、@Cacheable、@CachePut、@CacheEvit、@Caching注解注解 解释 @Cacheable 在方法执行前Sp...原创 2020-01-04 13:50:15 · 2082 阅读 · 0 评论 -
Spring Boot中使用Swagger2构建RESTful API文档
一、背景 由于Spring Boot具备快速开发、便捷部署等特性,很大一部分Spring Boot的用户会用来构建RESTful API。RESTful API为后台与前台的交互提供了简洁的接口API,并且有利于减少与其他团队的沟通成本,通常情况下,我们会创建一份RESTful API文档来记录所有的接口细节,但是这样做存在以下几个问题:由于接口众多,并且细节复...转载 2019-08-31 15:09:47 · 206 阅读 · 0 评论 -
Spring Boot中集成Mybatis(动态拼接SQL)
一、在pom.xml中添加以下依赖:<dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </de...转载 2019-08-31 15:10:31 · 6072 阅读 · 1 评论 -
SpringBoot集成thymaleaf+layui+swagger2中遇到的问题
首先,我们要知道Springboot默认是不支持JSP的,默认使用thymeleaf模板引擎。以下是我在使用的过程中遇到的一些问题:1、Field empMapper in com.test.service.EmployeeService required a bean of type 'com.test.mapper.EmployeeMapper' that could not be fou...原创 2019-09-08 16:06:13 · 601 阅读 · 0 评论 -
SpringBoot+Mybatis+MySQL页面显示乱码,显示的是??问号
SpringBoot+Mybatis+MySQL页面显示乱码,如下图:解决办法:在Controller的映射中添加produces = "application/json;charset=utf-8",即可解决乱码问题。解决后的显示:...转载 2019-09-10 20:59:48 · 339 阅读 · 0 评论