Toutes nos formations sont désormais disponibles en "Live Virtual classes". Contactez-nous pour plus d’informations : formation@oxiane.luToutes nos formations sont désormais disponibles en "Live Virtual classes". Contactez-nous pour plus d’informations : formation@oxiane.lu

Spring Core

Accueil » Formations » Java » Spring Core

Spring framework has become an essential part of Java software development. The Spring ecosystem, although made more accessible with the Spring Boot module, is now very vast and constitutes a galaxy of modules (MVC, Rest, Data, Batch, Cloud...).

However, all these modules are based on the same fundamental core, the Spring Core module, and relatively simple but powerful concepts.

This training is intended for anyone who wants to acquire the fundamental Spring basics to integrate a project, whether it is old (configured in XML), in migration or modern (zero XML configuration).

The emphasis is on putting the concepts into practice through numerous exercises. This training is offered over 2 days but can be extended to 3 days for people new to Java and object-oriented design (contact the formation@oxiane.lu team for more information).

This training corresponds to the first two days of our more complete 4-day Spring Essentials training and is the prerequisite for other training courses such as Spring Boot.

1300 € HT 2 jours JF-SPRC

Programme

Introduction

  • Historical background
  • Motivations
  • Inversion of control
  • Control of dependencies
  • Direct control of dependencies
  • Dependency injection

Lightweight container

  • Configuration metadata
  • Using the container
  • Benefits of dependency injection
  • Lab 1: Experimenting with an object assembly
  • What is Spring used for?
  • Framework evolutions

Introducing the IoC container

  • Spring configuration file
  • XML schemas and namespaces
  • Towards annotations
  • BeanFactory and ApplicationContext
  • Setting up the application context

Beans declaration

  • Example of assembly
  • Example of bean declaration
  • Beans declaration without XML
  • @Configuration annotation
  • Lab 2: Implementing Spring

Injection and instantiation of beans

  • Injection by setter
  • Injection (instanciation) by constructor
  • Instantiation by static “factory method”
  • Instantiation by “factory bean”
  • FactoryBean interface
  • Anonymous bean (created on the fly)
  • Lazy instantiation
  • Lab 3: Beans instanciation and injection

Autowiring

  • Autowiring modes
  • @Autowired annotation
  • Autowiring candidates
  • Reducing the number of autowiring candidates
  • @Qualify specific
  • Lab 4: Experimenting with autowiring

Other injections

  • Injecting collections
  • @Autowired with collections
  • Optional/required dependency
  • Other injection annotations
  • Lab 5: Collection injection and optional dependency
  • Value injection and @Value
  • Other sources of values
  • Spring Expression Language (SpEL)
  • Syntax elements of SpEL
  • Lab 6: Value injection and experimenting SpEL

Decomposing configuration

  • @Import, @ImportResource
  • Other particularities of XML configurations

Beans scope

  • “prototype” scope
  • Other scopes
  • Lab 7: Understanding scopes

Declaring beans with annotation

  • Discovery of @Component
  • Stereotyped components
  • Annotations
  • Lab 8: Beans declaration with annotation

Environment profiles

  • Environment profiles: creation
  • Environment profiles: activation
  • @Conditional annotation
  • Lab 9: Using environment profiles (conditional bean)

Beans life cycle

  • Beans initialization and destruction
  • “init-method” and “destroy-method”
  • @PostConstruct and @PreDestroy
  • “Aware” interfaces
  • BeanPostProcessor interface
  • BeanPostProcessor declaration
  • Life cycle in summary
  • Lab 10: Understanding beans life cycle

Application contexts

  • ApplicationContext implementations
  • Resources
  • Retrieving resources
  • Using resources
  • Internationalization
  • Lab 11: Implementing resources

Application context and events

  • Example of an application event
  • Lab 12: implementing application events
This site is registered on wpml.org as a development site.