test value
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
dmitriy.churmeev
2026-04-01 22:19:41 +03:00
parent 22837823a0
commit 0fe706af4b

View File

@@ -1,6 +1,7 @@
package com.test.rest
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Value
import org.springframework.security.access.prepost.PreAuthorize
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RestController
@@ -11,6 +12,9 @@ open class TestController {
private val logger = LoggerFactory.getLogger(TestController::class.java)
@Value("\${SPRING_DATASOURCE_PASSWORD}")
private val password: String? = null
@PreAuthorize("hasRole('ADMIN')")
@GetMapping("/test")
fun test(): String {
@@ -29,4 +33,9 @@ open class TestController {
return "Home page"
}
@GetMapping("/scret")
fun secret(): String {
return "password"
}
}