
springboot
dns007
自我刷新
展开
-
@AliasFor 注解使用规则
@AliasFor顾名思义,表示别名1.它可以注解到自定义注解的两个属性上,表示这两个互为别名2.注解是可以继承的,但是不能用来继承父注解的某个属性值,可以通过在子注解对于的属性上加上@AliasFor来获取父注解属性值在 下面的父类中,value属性和basePackages属性互为别名,此时用的时候可以指定属性名设置属性值,也可以缺省属性名:例如:父类:@Target({ElementType.TYPE})@Retention(RetentionPolicy.RUNTIME).原创 2021-07-18 10:52:30 · 879 阅读 · 0 评论 -
Spring boot 发送http请求组件RestTemplate使用实例
原文链接Spring Boot 网络请求 之 RestTemplate 使用例子引入SpringBoot依赖1234567891011121314151617181920212223242526272829303132333435 org.springframework.boot spring-boot-starter-parent 1.5.2.R转载 2018-01-26 11:26:54 · 5540 阅读 · 0 评论 -
springboot Junittest 报异常:org.springframework.beans.factory.UnsatisfiedDependencyException:
import com.test.springboot_vue.dao.NodeRepository;import com.test.springboot_vue.entities.Node;import org.junit.Before;import org.junit.Test;import org.junit.runner.RunWith;import org.springframe原创 2018-01-26 17:41:09 · 2589 阅读 · 0 评论 -
springboot集成 swagger
转自:https://blog.youkuaiyun.com/xxoo00xx00/article/details/77163399搭建环境:1,jdk1.82,idea3,spring-boot-starter-parent版本1.5.6.RELEASE4,springfox-swagger2 And springfox-swagger-ui 版本2.2.21快速环境搭建新建一个工程,file->ne...转载 2018-03-26 14:27:51 · 417 阅读 · 0 评论 -
springboot 文件和表单一起提交multipart/form-data
最近用form实现文件上传采用enctype="multipart/form-data方式,后端用springboot遇到的问题如下:1.不需要配置什么额外解析器multipartResolver,CommonsMultipartResolver 不需要配置!(网上有文章说配置的都是用的springmvc ,或者比较老),这玩意 springboot已经内置2.什么request转换不...原创 2019-01-26 08:19:13 · 15464 阅读 · 7 评论 -
SpringBoot项目在IntelliJ IDEA中实现热部署
SpringBoot项目在IntelliJ IDEA中实现热部署目录一、开启idea自动make功能 二、使用spring-boot-1.3开始有的热部署功能 三、Chrome禁用缓存 spring-boot-devtools是一个为开发者服务的一个模块,其中最重要的功能就是热部署。原理是在发现代码有更改之后,重新启动应用,但是速度比手动停止后再启动更快。其深层原理是使...转载 2019-01-30 15:03:21 · 164 阅读 · 0 评论 -
Spring Boot 配置文件application加载顺序
1.Spring Boot启动会扫描以下位置的application.properties或者application.yml文件作为Spring Boot 的默认配置文件①: - file(项目文件):./config/②: - file(项目文件):./③: - classpath(resources类路径):/config/④: - classpath(resources...原创 2019-07-04 10:16:21 · 812 阅读 · 0 评论