This video is an exercise about implementing the Adapter pattern in Spring and having the framework utilize it.
- So now that we have discussed the adaptor pattern … and what its used for and how it operates, it's time … to go implement it in code. … I would like you to go ahead and navigate to your IDE. … and open our source, main, java, our base package … and lets create a new package in here … called adapter. … Now we are going to create an adapter that is going … to treat an orange like an apple. Which is something … Gus Porticolis would very happy with us, since apples … and oranges are all fruit. So let's start with an … interface for apple. Our apple interface is going to … implement two methods. One is going to be a getVariety … and another is going to void method called eat. … So now that we have built the apple interface, let's go … create our orange interface. Now, our orange interface … is going to look very similar to our apple but it's going … to have getVariety string method and it's also going to have … a void eat method but its going to have a void peel method … and a void juice method. And that is all we are going to …
AuthorFrank P Moley III
- The patterns of the Spring framework
- Creational patterns in Spring
- The adapter and decorator pattern in action
- Structural patterns in Spring
- The repository pattern in action
- The observer, command, and mediator patterns
Skill Level Advanced
Spring: Framework In Depth (2017)with Frank P Moley III2h 16m Intermediate
What you should know1m 28s
1. Design Patterns and Spring
2. Creational Patterns in Spring
3. Structural Patterns in Spring
4. Operational Patterns in Spring
5. Other Framework Patterns in Spring
Next steps3m 27s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.