![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springboot
梦醒了该散了
这个作者很懒,什么都没留下…
展开
-
springboot读取配置文件的三种方法
springboot读取配置文件的三种方法配置文件如下1.Environment :可以通过Environment的getProperty方法来获取想要的配置信息,如下图所示2. @Value:可以注入具体的配置信息3. 自定义配置类:prifix定义配置的前缀package com.cd.dao;import org.springframework.boot...原创 2019-12-29 16:40:34 · 2143 阅读 · 0 评论 -
springboot 自定义注解拦截器
springboot 自定义注解拦截器最近在工作中,发现自定义注解拦截使用起来特别方便,现在来写出来给大家看看环境springboot首先写一个自定义注解package com.study.cdmy.common;import java.lang.annotation.ElementType;import java.lang.annotation.Retention;impor...原创 2019-04-09 17:11:49 · 2444 阅读 · 2 评论 -
springboot 整合 mybatis 开发
springboot 整合 mybatis 开发1.springboot项目能正常访问2. pom.xml配置<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchem...原创 2019-04-17 16:59:49 · 109 阅读 · 0 评论 -
springboot 上传文件 thymeleaf
springboot 上传文件 thymeleaf本文主要说的是springboot使用thymeleaf上传文件pom.xml依赖 <!--web项目--> <dependency> <groupId>org.springframework.boot</groupId> ...原创 2019-04-28 17:12:45 · 1298 阅读 · 3 评论 -
springboot 整合 ServletRequestListener监听器
springboot 整合 ServletRequestListener监听器Listener是在servlet2.3中加入的,主要用于对Session,request,context等进行监控。使用Listener需要实现响应的接口。触发Listener事件的时候,会自动调用Listener的方法。常用的监听接口HttpSessionListener:监听HttpSession的操作,监...原创 2019-04-25 17:55:52 · 4165 阅读 · 0 评论 -
springboot整合ElasticSearch
springboot整合ElasticSearchspringboot 整合ElasticSearch 前提前提是在服务器上面已经搭建了ElasticSearch,并且能外网访问pom.xml依赖 <!--spring整合elasticsearch包--> <dependency> <groupId>org...原创 2019-05-16 15:50:31 · 273 阅读 · 0 评论