Browsed by
Tag: spring

Spring Core – Create bean(POJO) using constructor

Spring Core – Create bean(POJO) using constructor

Constructor is common way to create a instance of class. In Spring framework we have facility to create a bean using constructors. The below example demonstrate how to create a bean using constructor.

To create bean(POJO) using setter method, click here.

1) School.java

We have a School bean which contain name and noOfFaculties as instance variables.

Read More Read More