01 2019 档案
摘要:项目地址:https://gitee.com/indexman/spring_boot_in_action 前面一章介绍了spring boot自带的缓存,下面讲一下如何在2.0版本中集成并使用redis进行数据缓存。 1.修改pom.xml添加redis依赖 <!--引入redis--> <dep
阅读全文
摘要:项目地址:https://gitee.com/indexman/spring_boot_in_action 下面就介绍一下如何使用spring boot自带的缓存。按步骤来操作即可,不懂的可以去看项目源码。 1.新建simple-cache模块,修改pom文件 <?xml version="1.0"
阅读全文
摘要:spring boot默认使用的是logback作为日志框架,那如何使用log4j2呢?下面就给大家介绍一下集成步骤: 此处我使用的是spring boot 2.1.2 1.新建一个spring boot项目,配置log4j2依赖 <?xml version="1.0" encoding="UTF-
阅读全文
摘要:项目地址:https://gitee.com/indexman/spring_boot_in_action 编写实体类User package com.laoxu.springboot.entity; import com.fasterxml.jackson.annotation.JsonIgnor
阅读全文
摘要:解决步骤如下: D:\program\mysql-5.7.16-winx64\bin>mysql -uroot -p Enter password: ******* Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL
阅读全文
摘要:# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html # *** DO NOT EDIT THIS F
阅读全文
摘要:项目地址:https://gitee.com/indexman/spring_boot_in_action 1.准备sql文件 将department.sql放到resources路径下 /* Navicat MySQL Data Transfer Source Server : 本地 Source
阅读全文
摘要:项目地址:https://gitee.com/indexman/spring_boot_in_action 开发步骤 1.编写国际化配置文件 场景是给登录页面 login.html添加国际化支持。 2.使用ResourceBundleMessageSource管理国际化资源文件 3.在页面使用取出国
阅读全文
摘要:问题描述 今天做单元测试报错:unable to find a @SpringBootConfiguration 问题原因 有几种可能性,逐个排除下对症下药: 1.程序入口类忘了添加:SpringBootApplication注解 2.程序入口类的包名和测试类所在包名不一致 例如: 主类:com.e
阅读全文