Template Method Pattern
Learn Template Method Pattern (Spring MVC Architecture & Design Patterns, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Fresher Notes Template Method : a base class defines the fixed steps of an algorithm and lets subclasses or callbacks fill in the varying steps. Spring examples : JdbcTemplate , RestTemplate , TransactionTemplate and JmsTemplate handle the boilerplate and call your code in the middle. Benefit : resource handling (connections, statements, cleanup) is written once and cannot be forgotten.