Merge branch '6.2.x'
This commit is contained in:
@@ -14,16 +14,13 @@ For example, `@Autowired lateinit var thing: Thing` implies that a bean
|
|||||||
of type `Thing` must be registered in the application context, while `@Autowired lateinit var thing: Thing?`
|
of type `Thing` must be registered in the application context, while `@Autowired lateinit var thing: Thing?`
|
||||||
does not raise an error if such a bean does not exist.
|
does not raise an error if such a bean does not exist.
|
||||||
|
|
||||||
Following the same principle, `@Bean fun play(toy: Toy, car: Car?) = Baz(toy, Car)` implies
|
Following the same principle, `@Bean fun play(toy: Toy, car: Car?) = Baz(toy, car)` implies
|
||||||
that a bean of type `Toy` must be registered in the application context, while a bean of
|
that a bean of type `Toy` must be registered in the application context, while a bean of
|
||||||
type `Car` may or may not exist. The same behavior applies to autowired constructor parameters.
|
type `Car` may or may not exist. The same behavior applies to autowired constructor parameters.
|
||||||
|
|
||||||
NOTE: If you use bean validation on classes with properties or a primary constructor
|
NOTE: If you use bean validation on classes with properties or a primary constructor
|
||||||
parameters, you may need to use
|
with parameters, you may need to use
|
||||||
{kotlin-docs}/annotations.html#annotation-use-site-targets[annotation use-site targets],
|
{kotlin-docs}/annotations.html#annotation-use-site-targets[annotation use-site targets],
|
||||||
such as `@field:NotNull` or `@get:Size(min=5, max=15)`, as described in
|
such as `@field:NotNull` or `@get:Size(min=5, max=15)`, as described in
|
||||||
{stackoverflow-site}/a/35853200/1092077[this Stack Overflow response].
|
{stackoverflow-site}/a/35853200/1092077[this Stack Overflow response].
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user