Indicates that a method produces a bean to be managed by the Spring container.
Indicates that a class declares one or more @Bean methods and may be processed by the Spring container to generate bean definitions and service requests for those beans at runtime
Enable auto-configuration of the Spring Application Context, attempting to guess and configure beans that you are likely to need. Auto-configuration classes are usually applied based on your classpath and what beans you have defined.
Configures component scanning directives for use with @Configuration classes. Provides support parallel with Spring XML’s <context:component-scan> element.
ConfigurableApplicationContextctx=SpringApplication.run(Application.class,args);System.out.println("Let's inspect the beans provided by Spring Boot:");ObjectdataSource=ctx.getBean("dataSource");ObjecttransactionManager=ctx.getBean("transactionManager");ObjectentityManagerFactory=ctx.getBean("entityManagerFactory");System.out.println(dataSource);System.out.println(entityManagerFactory);System.out.println(transactionManager);System.out.println(((JpaTransactionManager)transactionManager).getDataSource());System.out.println(((JpaTransactionManager)transactionManager).getEntityManagerFactory());
Joind策略的含义是：A strategy in which fields that are specific to a subclass are mapped to a separate table than the fields that are common to the parent class, and a join is performed to instantiate the subclass.