Skip to content

Latest commit

 

History

History
84 lines (59 loc) · 3.9 KB

README.md

File metadata and controls

84 lines (59 loc) · 3.9 KB

Winter Framework

My tryout to create simplified version of Spring Framework core for educational purposes.

I was inspired by this article.

Supported features

  • Classpath scanning for components
  • Multi-staged constructor for components
  • Field or setter based dependency injection
  • Aware callbacks: BeanNameAware, BeanFactoryAware
  • Bean post processors support, with post processing before and after initialization
  • Javax bean lifecycle annotations support: @PostConstruct, @PreDestroy
  • InitializingBean and DisposableBean callbacks
  • Application event listening

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

The project has no dependencies, it uses only pure java, you don't need to preinstall anything except java.

✗ java -version
openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)

Installing

Clone the project and open in your favourite IDE.

End with an example of getting some data out of the system or using it for a little demo

Running

Just run Main.java to test framework functionality. Several services created fot testing purposes:

These testing classes are designed to demonstrate all features and provide following console output:

==Initializing bean factory==
==Populating bean properties==
@PostConstruct is called in AnotherServiceBean
com.github.vlsidlyarevich.test.ServiceBean@5b275dab is set
AnotherServiceBean is called
serviceBean is called
FirstRepositoryBean is called
com.github.vlsidlyarevich.winterframework.beans.factory.SimpleBeanFactory@61832929 is here
Context is closed

Bean lifecycle

Framework supports following bean lifecycle:

Bean lifecycle

Contributing

This project is just my research based on this article. No any specific rules of contribution needed.

Authors

Vladislav Sidlyarevich - Github profile

License

This project is licensed under the Apache 2.0 License - see the LICENSE.md file for details