spring-modules

java module system - why do we need to explicitly specify the default modules in -add-modules

独自空忆成欢 提交于 2021-01-29 07:03:05
问题 Recently I was converting a spring boot(2.1.3 version) dummy project into a spring boot muti module project on java 11. To make it work I have to explicitly add --add-modules=java.instrument as run time vm argument. Please find the related so question here Spring boot multi module project with java 11 throws cannot access class org.springframework.cglib.core.ReflectUtils Then I checked the default modules of my installed jdk using —list-modules and I can see that java.instrument in that. I

annotation based Spring bean validation

假如想象 提交于 2019-12-03 05:09:01
问题 I'm investigating an annotation-based approach to validating Spring beans using spring modules. In this tutorial, the following bean (getters and setters omitted) is used as an example: public final class User { @NotBlank @Length(max = 80) private String name; @NotBlank @Email @Length(max = 80) private String email; @NotBlank @Length(max = 4000) private String text; } The error message that is used if a particular validation rule is disobeyed should follow this format: bean-class.bean-propery

annotation based Spring bean validation

天大地大妈咪最大 提交于 2019-12-02 19:30:03
I'm investigating an annotation-based approach to validating Spring beans using spring modules . In this tutorial , the following bean (getters and setters omitted) is used as an example: public final class User { @NotBlank @Length(max = 80) private String name; @NotBlank @Email @Length(max = 80) private String email; @NotBlank @Length(max = 4000) private String text; } The error message that is used if a particular validation rule is disobeyed should follow this format: bean-class.bean-propery[validation-rule]=Validation Error message Examples for the class shown above include: User.email[not