https://github.com/ritreshgirdhar/spring-proxy-aop
Proxy Pattern Demo using Spring Aspect oriented programming.
https://github.com/ritreshgirdhar/spring-proxy-aop
aop aspect-oriented-programming proxy spring spring-boot
Last synced: 8 months ago
JSON representation
Proxy Pattern Demo using Spring Aspect oriented programming.
- Host: GitHub
- URL: https://github.com/ritreshgirdhar/spring-proxy-aop
- Owner: RitreshGirdhar
- Created: 2020-08-29T14:49:35.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-19T19:24:35.000Z (about 5 years ago)
- Last Synced: 2025-05-04T08:53:17.684Z (8 months ago)
- Topics: aop, aspect-oriented-programming, proxy, spring, spring-boot
- Language: Java
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spring Boot Aop Demo - Proxy Pattern implementation
Created this application for a friend who was looking for some way to introduce caching layer as a proxy in his application. He had multiple caching source and he wanted to abstract that logic from the existing application
#### Pre-requisite
* Knowledge of Spring Boot + AOP concept. Structural Proxy Design pattern knowledge will also help.
## How to build Application
```
cd spring-proxy-aop
docker build -t spring-proxy-demo .
```
## How to run it
```
docker run -p8080:8080 spring-proxy-demo -d
```
## Proxy Pattern
As described here https://refactoring.guru/design-patterns/proxy .
**__Proxy Pattern is a structural design pattern that lets you provide a substitute or placeholder for another object__**
Here we are using Proxy Pattern for getting cached result on the bases of the record id in case of cache miss it will invoke the actual function. In real world application we require to save the hits on the resource that we could do by adding proxy layer of caching. There are various caching framework and libraries here we are using spring cache.
Thanks for reading, Happy Learning !!!!