package com.cy.pj.common.cache;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest//SpringBoot工程中的单元测试类需要使用此注解进行描述
public class DefaultCacheTests { // is a Object
/**@Autowired 告诉spring框架运行时为此属性注入一个值*/
@Autowired
private DefaultCache defaultCache;//has a DefaultCache
@Test
void testDefaultCache() {
//use a system (用system类中的out对象println<打印>)
System.out.println("defaultCache=" + defaultCache);
}
}
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论