From the course: Spring: Design Patterns

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

The Proxy pattern

The Proxy pattern

From the course: Spring: Design Patterns

Start my 1-month free trial

The Proxy pattern

- [Instructor] The Proxy pattern is another one of those behavioral patterns that you can see used throughout the entire Spring library. As a matter of fact, each and every bean that you create gets at least one proxy wrapped around it ever since Spring 4. Additional proxies are added, usually through the use of annotations when you are writing Spring code using the Spring framework. Now, if you want to create your own proxies and you're doing Spring development, you're usually going to do this by the creation of an aspect and using aspect-oriented programming. I have a lot of information about how to write aspects and how to use them in my course, Spring: Framework in Depth, and as such, we're not going to jump into that in this course. The way the proxy pattern works in a nutshell, is that you start with the use of an intermediate object in place of a real object. Now, what does that really mean? Both of these objects, the intermediary object and the real object will share the same…

Contents