An introduction allows us to make a Java class (we will refer to it as the target class) implement an interface at runtime. With Spring AOP, introductions can be applied only to Spring beans (controllers, services, and so on). In this recipe, we will create an interface, its implementation, and make a Spring controller implement that interface at runtime using that implementation. To check whether it's working, we will also add a before advice to the controller method to execute a method from the interface implementation.
SPRING COOKBOOK
SPRING COOKBOOK
Overview of this book
Table of Contents (19 chapters)
Spring Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
Creating a Spring Application
Defining Beans and Using Dependency Injection
Using Controllers and Views
Querying a Database
Using Forms
Managing Security
Unit Testing
Running Batch Jobs
Handling Mobiles and Tablets
Connecting to Facebook and Twitter
Using the Java RMI, HTTP Invoker, Hessian, and REST
Using Aspect-oriented Programming
Index
Customer Reviews