Kotlin SpringBoot Junit TestCase with @BeforeClass


#1

when i use @BeforeClass in kotlin and spring boot

i have some problem…

class FSServiceTest : ApplicationTest() {

    @Autowired
    lateinit var fsService: FSService

    companion object {

        @JvmStatic
        @BeforeClass
        fun setup() {
            fsService.del("")//can`t find fsService
        }
    }
}