最新发布
排序
Spring Boot项目全局异常处理方式
SpringBoot中,@ControllerAdvice 即可开启全局异常处理,使用该注解表示开启了全局异常的捕获,我们只需在自定义一个方法使用@ExceptionHandler注解然后定义捕获异常的类型即可对这些捕获的异...
springboot项目使用advice做统一返回处理
ResponseBodyAdvice接口 public interface ResponseBodyAdvice<T> { // 是否支持advice功能 // true 支持,false 不支持 boolean supports(MethodParameter returnType, Class<? extends ...
@RequestParam,@PathParam,@PathVariable等注解区别
@RequestParam 和 @PathVariable 注解是用于从request中接收请求的,两个都可以接收参数,关键点不同的是@RequestParam 是从request里面拿取值,而 @PathVariable 是从一个URI模板里面来...
Spring Boot条件注解
ConditionalOnBean:是否存在某类或某个名字的BeanConditionalOnMissingBean:是否缺失某个某类或某个名字的BeanConditionalOnSingleCandidate:是否符合指定类型的Bean只有一个ConditionalOnCl...
Spring boot属性绑定
@PropertySourece() my.properties name=kil UserService.java 添加@PropertySource('my.properties')指定配置文件 引用@Value('${name}') package cn.kil.springboot_parameter.service; impor...
Spring boot整合mybatis步骤
添加数据库以及mybatis maven依赖 jdbc:mybatis包含了spring-boot-starter-jdbc可以不用添加 <!-- mybatis --> <dependency> <groupId>org.mybatis.spring.boot</groupId> <art...
JAVA之自动装配
级联属性赋值 在<bean>的<property>子元素中,为它所依赖的Bean的属性进行赋值,这就是所谓的'级联属性赋值'。 使用级联属性赋值注意事项: java类中必须有setter方法java类中必须有无参...
node定时发送html格式邮件,带模板引擎编辑动态编辑html
//引用模块 const nodemailer =require('nodemailer') const schedule =require('node-schedule') const path =require('path') const template=require('art-template') //模板路径 const view...
SSM配置MyBatis步骤
1.添加所需maven依赖 maven仓库:https://mvnrepository.com/ <!--Mybatis--> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>...
小鹿快传 – 在线P2P文件传输工具
简介 小鹿快传是一款Web端的P2P文件传输工具,使用了WebRTC技术实现P2P连接和文件传输。 项目地址 https://github.com/fanchangyong/deershare 产品截图 使用说明 获取项目 git clone https://g...
outguo2年前1
里面教程有点糊,不过全部可以正常运行listuoi2年前1
给宝塔面板挺好的?toycly2年前0
非常完美?????yiyun2年前0
挺全的,可惜要挂机宝。