question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bean Validation on rest controller does not work with 2.0.0.M7 and Kotlin

See original GitHub issue

I made a test case: https://github.com/MrBuddyCasino/spring-validator-test

Execute the following test case: de.codecentric.controller.AccountControllerShould

Expected result: the request should fail with a BadRequest, the unit test should fail

Actual result: the request succeeds, the unit test fails

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

13reactions
zaypencommented, Jan 17, 2018

@MrBuddyCasino This isn’t an issue, two ways could get it work as I know The reason it doesn’t work, is that you put them in the primary constructor

  1. Use @field:Email to tell Kotlin the annotation should be applied to fields rather than constructor parameters
  2. Put @Email val email: String to class body, in { and }
1reaction
MrBuddyCasinocommented, Dec 13, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring Boot Reference Guide
This section provides a brief overview of Spring Boot reference documentation. Think of it as map for the rest of the document. You...
Read more >
Rest controller con Spring Boot 2 y Kotlin siempre retorna la ...
Stack Overflow for Teams is moving to its own domain! When the migration is complete, you will access your Teams at stackoverflowteams.com, and ......
Read more >
spring-projects/spring-boot - Gitter
I'm doing some test with existing projects by migrating those to spring-boot-starter-paren version 2.0.0.M7 one thing I noticed is that service fails with...
Read more >
Build a reactive application with Spring Boot 2.0 and Angular
The backend will be built with the latest Spring 5 reactive stack, including: Spring Boot 2.0, at the moment the latest version is...
Read more >
io.micronaut : micronaut-bom : 3.4.0 - Maven Central Repository ...
Gradle Kotlin DSL github.com/gradle/kotlin-dsl. content_copy. implementation("io.micronaut:micronaut-bom:3.4.0"). Scala SBT scala-sbt.org. content_copy.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found