摘要:
@Component、@Controller、@Service、@Repository,用法略 @Import * 4、@Import({User.class, DBHelper.class}) * 在容器中自动创建出这两个类型的组件、默认组件的名字就是全类名 */ @Import({User.cl 阅读全文
摘要:
1.Configuration和Bean package com.atguigu.config; import com.atguigu.bean.Pet; import com.atguigu.bean.User; import org.springframework.context.annotat 阅读全文
摘要:
第一步:导入maven依赖 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.3.4.RELEASE</version 阅读全文