Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 956 Bytes

README.md

File metadata and controls

57 lines (39 loc) · 956 Bytes

spring-utils

This is a tiny utilities library with commonly used features in Spring applications.

How to use?

Add the dependency

Maven

<dependency>
    <groupId>io.github.sivalabs</groupId>
    <artifactId>spring-utils</artifactId>
    <version>0.0.2</version>
</dependency>

Gradle

implementation 'io.github.sivalabs:spring-utils:0.0.2'

LoggingAspect

Add io.github.sivalabs.springutils package to ComponentScan

@Configuration
@ComponentScan(basePackages={"io.github.sivalabs.springutils"})
public class AppConfig {

}

Use @Loggable annotation to Class or Method that you want to log.

@Controller
@Loggable
public class MyController {

}

@Service
public class MyService {
    @Loggable
    public void doIt() {
    
    }
}

Enable DEBUG log level to io.github.sivalabs.springutils in application.properties.

logging.level.io.github.sivalabs.springutils=debug