Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Ms-Shahid/Spring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

2 Commits

Repository files navigation

Spring annotations with XML & JAVA

Exploring the Spring & spring framework architectures Spring is a light weight framework of other various frameworks such as spring-core, spring-mvc, spring-AOP & so on.

This git-repo contains all the hands-on learning & the projects related to all the spring framework family.

First talking about the various XML & Java based configurations & annotations

  • Spring fundamentals-repo
    consists of a basic application, which describes how the wiring of the model, service & repository components are wired together. Note: The instances of components are tightly coupled in this application

  • Spring XML
    is wired up with applicationContext.xml for constructor injection, setter injection & bean Autowire configurations such as

- byType: searches for the bean in given class (doesn't care about the setter name)
- byName: searches for the setter injection (setter method) in the given class
- Constructor: requires the no-argument(default) constructor
- no : (none)
  • Spring XML Annotations
    Here the application is modified to use the stereotype bean annotations along with constructor & setter injections in the applicationContext such as
- @Component : any POJO based annotation
- @Service : business logic tier, (in the service-interface class)
- @Repository : data layer
  • Spring JAVA Annotations
    • The application is purely based on the Java Annotations with AppConfig & properties file. Here the components are wired up with @componentScan which searches at the root package level.
    • And beans are configured to use setter & constructor injection. Also, the application is configured with singleton & prototype scope configurations at the service tier

About

Exploring the Spring & spring framework architectures

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /