Spring5 框架新功能(Webflux),java基础笔试面试题以及答案

本文介绍了Spring5框架的新特性,包括核心容器对@Nullable注解的支持,函数式风格的GenericApplicationContext,以及Spring5对JUnit5的整合。特别地,文章深入探讨了SpringWebflux,一个异步非阻塞的Web开发框架,对比了它与SpringMVC的区别,并阐述了响应式编程的概念和在Java中的实现。
摘要由CSDN通过智能技术生成

import org.slf4j.Logger;

import org.slf4j.LoggerFactory;

public class UserLog {

private static final Logger log= LoggerFactory.getLogger(UserLog.class);

public static void main(String[] args){

log.info(“hello log4j2”);

log.warn(“hello log4j2”);

}

}

3、Spring5 框架核心容器支持@Nullable 注解

(1)@Nullable 注解可以使用在方法上面,属性上面,参数上面,表示方法返回可以为空,属性值可以

为空,参数值可以为空

(2)注解用在方法上面,方法返回值可以为空

在测试类上ApplicationContext的类中,源码如下:

//

// Source code recreated from a .class file by IntelliJ IDEA

// (powered by FernFlower decompiler)

//

package org.springframework.context;

import org.springframework.beans.factory.HierarchicalBeanFactory;

import org.springframework.beans.factory.ListableBeanFactory;

import org.springframework.beans.factory.config.A

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值