Coder Social home page Coder Social logo

sanashahsyeda / springcore-implementation Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 69 KB

Implementation of Spring core terminologies such as setter injection, constructor injection, auto-wiring, and bean life cycle.

Java 100.00%
xml bean-lifecycle constructor-injection setter-injection standalone-collections

springcore-implementation's Introduction

Spring Core

  • Open source
  • Lightweight.
  • Written in java.
  • Framework of frameworks.
  • Enterprise and internet support.
  • Provides pattern and structure for java.
  • It manages object instances (Application context).
  • Used to make java application loosely coupled (easy to change).

Life Cycle Method of Beans -------------- >>

  • Spring provide two important methods to every bean.
  • public void init (): for initialization code.
  • public void destroy(): for cleanup code.

• Life Cycle

  • Bean object created with metadata of configuration XML file.
  • Set properties values.
  • Init() method called.
  • Read and use the beans.
  • Destroy() method called.
  • Bean object ended.

Configuration Technique

o XML

o Spring interface

  • Initializing Bean: for init() method
  • Disposable Bean: for destroy() method

o Annotation.

  • @PostConstruct: for init() method
  • @PreDestroy: for destroy() method.
  • Note that both the @PostConstruct and @PreDestroy annotations are part of Java EE. If you are using java 9 and above, add an additional dependency in “pom.xml” to use these annotations.
  • Annotations are disabled by default, to enable annotations
  • All annotations:“context:annotation-config”
  • Only @PostConstruct and @PreDestroy:”

springcore-implementation's People

Contributors

sana-syeda avatar sanashahsyeda avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.