Grokking Spring Boot
0% completed
Annotations That Work Through Proxies
What do @Transactional, @Cacheable, @Async, and @Retryable have in common? They do very different jobs. One opens a transaction, one skips a method when its result is already stored, one moves a call to another thread, and one repeats a call that failed.
Yet none of them contains any behavior. An annotation is only a label in the compiled class. Something must read the label and act on it, and for all four, that something is a proxy of the kind built in JDK Proxies and Class-Based Proxies.
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%