2022年12月14日 星期三

Spring Boot SLF4j Logback example

https://mkyong.com/spring-boot/spring-boot-slf4j-logging-example/

1. Project Directory

2. Maven

3. application.properties

4. logback.xml

 5. Spring Boot logging by Profile


https://github.com/mkyong/spring-boot


Profile-specific Configuration Files

https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.logging


Java updates

 https://mkyong.com/



Validation for Spring Rest

 https://mkyong.com/spring-boot/spring-rest-validation-example/

1. Controller 

2. Bean Validation (Hibernate Validator)

3. Path Variables Validation

4. Custom Validator

5. Spring Integration Test

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