Skip to content

Commit 7362bb2

Browse files
committed
Add Slf4j annotation
1 parent e0229f1 commit 7362bb2

File tree

1 file changed

+18
-0
lines changed
  • tang-commons/src/main/java/com/tang/commons/annotation

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.tang.commons.annotation
2+
3+
import org.slf4j.Logger
4+
import org.slf4j.LoggerFactory
5+
6+
/**
7+
* Slf4j 注解
8+
*
9+
* @author Tang
10+
*/
11+
@Target(AnnotationTarget.CLASS)
12+
@Retention(AnnotationRetention.RUNTIME)
13+
annotation class Slf4j {
14+
companion object {
15+
val <reified T> T.LOGGER: Logger
16+
inline get() = LoggerFactory.getLogger(T::class.java)
17+
}
18+
}

0 commit comments

Comments
 (0)