2022年12月14日 星期三

Using Spring Aspect in Spring Boot

 Spring Aspect (AOP) aims to help with separation of concerns by providing clean reusable annotation classes.


When we work with REST controllers, especially when we create APIs for internal (or external) use, we usually end up with a lot of duplicate code that is difficult to refactor out. To solve this we will utilize Spring Aspect and Aspect-Oriented Programming (AOP) in a real world example of how you may completely remove duplicate code in your REST Controllers.


https://ivanskodje.com/using-aop-in-spring-boot/

=======

Spring Boot + Spring AOP Logging Example Tutorial

https://www.javaguides.net/2019/05/spring-boot-spring-aop-logging-example-tutorial.html


Examples of cross-cutting concerns:

Logging

Security

Transaction management

Auditing,

Caching

Internationalization

Error detection and correction

Memory management

Performance monitoring

Synchronization


============

AOP concept

https://www.baeldung.com/spring-aop


AOP: Aspect-Oriented Programming Overview


AOP Record user operation

https://www.appsdeveloperblog.com/a-guide-to-spring-boot-aop-to-record-user-operations/


https://docs.spring.io/spring-framework/docs/2.0.x/reference/aop.html

https://docs.spring.io/spring-framework/docs/2.0.x/reference/aop-api.html

https://www.baeldung.com/spring-aop



沒有留言:

張貼留言

IT Knowledge Map

https://docs.google.com/spreadsheets/d/1ZmN7G1unUAEpTPp5ObDnlAUtILLwwvluy-KHumMPEUU/edit#gid=0