I have a question about applying bean validation 2.0


I am applying bean validation 2.0 in my project.

When I apply the following part of the bean validation2.0 function, it works in java but not in kotlin.

support for validating container elements by annotating type arguments of parameterized types e.g. List<@Positive Integer> positiveNumbers. This also includes:

Below is the code I tested:

@SpringBootTest(classes = arrayOf(Application::class))
class FooTest {
lateinit var fooService: FooService

    fun test() {
        var foo = Foo()

class FooService {
    fun foo(@Valid foo: Foo) {


class Foo {
    var values: MutableList<@Min(10) Int> = mutableListOf()

public class Foo {
    List<@Min(10) Integer> values = new ArrayList();

Why does not it work in kotlin?
Thank you.