generated from aura-ascend/template-library
TestContainer Postgres
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package ltd.lulz.test.container.util
|
||||
|
||||
import org.springframework.core.io.ClassPathResource
|
||||
|
||||
fun String.isResourceFile(): ClassPathResource? = ClassPathResource(this)
|
||||
.let { resource ->
|
||||
when {
|
||||
resource.exists() && resource.isReadable -> resource
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
inline fun <reified T : Annotation> Class<*>.hasAnnotation(): Boolean = getAnnotation(T::class.java) != null
|
||||
Reference in New Issue
Block a user