Skip to content

Latest commit

 

History

History
49 lines (38 loc) · 959 Bytes

File metadata and controls

49 lines (38 loc) · 959 Bytes

Spring Exploration

Base Dependency

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context</artifactId>
</dependency>

Spring context

ApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);
ctx.getBeanDefinitionNames();

Minimal beans:

  • internalConfigurationAnnotationProcessor
  • internalAutowiredAnnotationProcessor
  • internalEventListenerProcessor
  • internalEventListenerFactory
  • springConfig

Resources

  • No prefix
  • classpath:
  • file:
  • http:

Annotations

  • @Bean
  • @ComponentScan
  • @PropertySource
  • @Value
  • @Component
    • @Configuration
    • @Service
    • @Repository
  • @Autowired

Environment

Interface representing the environment in which the current application is running. Models two key aspects of the application environment: profiles and properties. Methods related to property access are exposed via the PropertyResolver superinterface.