{"id":1894,"date":"2025-05-13T12:09:07","date_gmt":"2025-05-13T03:09:07","guid":{"rendered":"https:\/\/route-zero.com\/recruit\/?post_type=route&#038;p=1894"},"modified":"2026-02-13T12:09:17","modified_gmt":"2026-02-13T03:09:17","slug":"spring-boot-%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e5%8a%b9%e3%81%8b%e3%81%aa%e3%81%84%ef%bc%9f5%e5%88%86%e3%81%a7%e7%9b%b4%e3%81%99%e6%96%b9%e6%b3%95","status":"publish","type":"route","link":"https:\/\/route-zero.com\/recruit\/route\/1894\/","title":{"rendered":"Spring Boot \u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u52b9\u304b\u306a\u3044\uff1f5\u5206\u3067\u76f4\u3059\u65b9\u6cd5"},"content":{"rendered":"<div>\n<h2>Spring Boot \u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3 \u52b9\u304b\u306a\u3044\u30925\u5206\u3067\u89e3\u6c7a\uff01\u73fe\u5834\u3067\u5f79\u7acb\u3064\u539f\u56e0\u7279\u5b9a\u3068\u30b3\u30d4\u30da\u30b3\u30fc\u30c9<\/h2>\n<p>Spring Boot\u3067WebAPI\u958b\u767a\u4e2d\u3001\u300c\u3042\u308c\uff1f\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u52b9\u3044\u3066\u306a\u3044\u2026\uff1f\u300d\u3068\u60a9\u3093\u3067\u3044\u307e\u305b\u3093\u304b\uff1f\u4e0d\u6b63\u306a\u30c7\u30fc\u30bf\u767b\u9332\u3067\u6570\u6642\u9593\u30cf\u30de\u308a\u3001\u7126\u308a\u3092\u611f\u3058\u3066\u3044\u308b\u3042\u306a\u305f\u3078\u3002\u79c1\u305f\u3061\u3082\u305d\u306e\u72b6\u6cc1\u3001\u7d4c\u9a13\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aSpring Boot<\/strong><br \/>\n      Java\u30d9\u30fc\u30b9\u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u958b\u767a\u3092\u52b9\u7387\u5316\u3059\u308b\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3002\u8a2d\u5b9a\u3084\u4f9d\u5b58\u95a2\u4fc2\u306e\u7ba1\u7406\u304c\u5bb9\u6613\u3067\u3001\u8fc5\u901f\u306a\u958b\u767a\u304c\u53ef\u80fd\u3002\n    <\/p>\n<\/blockquote>\n<p>\n    \u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u300cSpring Boot<br \/>\n    \u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u52b9\u304b\u306a\u3044\u300d\u72b6\u6cc1\u304b\u3089\u6700\u77ed5\u5206\u3067\u8131\u5374\u3059\u308b\u300c\u6700\u901f\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8\u300d\u3068\u3001\u30b3\u30d4\u30da\u53ef\u80fd\u306a\u300c\u5b8c\u5168\u7248Contruller\u30b3\u30fc\u30c9\u300d\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002\u96e3\u89e3\u306a\u7406\u8ad6\u306f\u5f8c\u56de\u3057\u3002\u300c\u307e\u305a\u306f\u76ee\u306e\u524d\u306e\u554f\u984c\u3092\u89e3\u6c7a\u3057\u305f\u3044\uff01\u300d\u3068\u3044\u3046\u30cb\u30fc\u30ba\u306b\u5fdc\u3048\u3001\u3088\u304f\u3042\u308b\u539f\u56e0\u3068\u5bfe\u51e6\u6cd5\u3092\u30b3\u30fc\u30c9\u4f8b\u3068\u3068\u3082\u306b\u89e3\u8aac\u3002\u8aad\u307f\u7d42\u3048\u308b\u9803\u306b\u306f\u3001\u3042\u306a\u305f\u306e\u30d0\u30b0\u306f\u89e3\u6d88\u3055\u308c\u3001\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u81ea\u529b\u3067\u4f7f\u3044\u3053\u306a\u305b\u308b\u81ea\u4fe1\u304c\u624b\u306b\u5165\u308b\u306f\u305a\u3067\u3059\u3002\u3055\u3042\u3001\u4e00\u7dd2\u306b\u3053\u306e\u30d1\u30cb\u30c3\u30af\u304b\u3089\u629c\u3051\u51fa\u3057\u307e\u3057\u3087\u3046\uff01\n  <\/p>\n<hr \/>\n<h2>\u300cSpring Boot \u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3 \u52b9\u304b\u306a\u3044\u300d\u306f\u3082\u3046\u7d42\u308f\u308a\u306b\u3057\u3088\u3046\uff015\u5206\u3067\u89e3\u6c7a\u3059\u308b\u6700\u901f\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8<\/h2>\n<p>Spring Boot\u3067\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u304c\u6a5f\u80fd\u3057\u306a\u3044\u6642\u3001\u591a\u304f\u306f\u300c\u3088\u304f\u3042\u308b\u30df\u30b9\u300d\u304c\u539f\u56e0\u3067\u3059\u3002\u307e\u305a\u306f\u3053\u306e\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8\u3067\u30b3\u30fc\u30c9\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u591a\u304f\u306e\u554f\u984c\u304c\u89e3\u6c7a\u3059\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<h3>\u307e\u305a\u306f\u3053\u3053\u3092\u78ba\u8a8d\uff01\u3088\u304f\u3042\u308b3\u3064\u306e\u539f\u56e0\u3068\u89e3\u6c7a\u30b3\u30fc\u30c9\uff08\u30b3\u30d4\u30daOK\uff09<\/h3>\n<p>\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u304c\u52b9\u304b\u306a\u3044\u3068\u611f\u3058\u305f\u3089\u3001\u307e\u305a\u78ba\u8a8d\u3059\u3079\u304d3\u70b9\u3068\u89e3\u6c7a\u30b3\u30fc\u30c9\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h4>1. <strong> @Valid<\/strong> \u307e\u305f\u306f <strong> @Validated<\/strong> \u3092\u5fd8\u308c\u3066\u3044\u307e\u305b\u3093\u304b\uff1f<\/h4>\n<p>\n    DTO\u5f15\u6570\u306b<strong><strong> @Valid<\/strong><\/strong\n    >\u3084<strong><strong>@Validated<\/strong><\/strong\n    >\u304c\u306a\u3044\u3068\u3001Spring Boot\u306f\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3057\u307e\u305b\u3093\u3002\n  <\/p>\n<p><strong>\u89e3\u6c7a\u30b3\u30fc\u30c9\u4f8b:<\/strong><\/p>\n<pre><code>\/\/ \u4fee\u6b63\u5f8c: @Valid \u307e\u305f\u306f @Validated \u3092\u8ffd\u52a0\r\nimport jakarta.validation.Valid; \/\/ Spring Boot 3.x\u306e\u5834\u5408\r\n\r\n\/\/ \u307e\u305f\u306f import org.springframework.validation.annotation.Validated; \/\/ Spring Boot 2.x\u306e\u5834\u5408\r\n\r\n @PostMapping(\"\/users\")\r\npublic ResponseEntity&lt;String&gt; createUser( @Valid @RequestBody UserRequestDto userDto) {\r\n    return ResponseEntity.ok(\"User created successfully\");\r\n}\r\n<\/code><\/pre>\n<h4>2. <strong>spring-boot-starter-validation<\/strong> \u306e\u4f9d\u5b58\u95a2\u4fc2\u304c\u4e0d\u8db3\u3057\u3066\u3044\u307e\u305b\u3093\u304b\uff1f<\/h4>\n<p>\n    Spring Boot 3.x\u3067\u306f\u3001Jakarta EE\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3API\u5229\u7528\u306e\u305f\u3081<strong><strong>spring-boot-starter-validation<\/strong><\/strong\n    >\u306e\u4f9d\u5b58\u95a2\u4fc2\u304c\u5fc5\u9808\u3067\u3059\u3002\uff08pom.xml\u3067\u306e\u4f9d\u5b58\u95a2\u4fc2\u306e\u7ba1\u7406\u306b\u3064\u3044\u3066\u306f\u300e<a href=\"https:\/\/route-zero.com\/recruit\/route\/1732\/\">Spring Boot pom.xml\u5fb9\u5e95\u89e3\u8aac\uff5c2025\u5e74\u7248 \u4f9d\u5b58\u7ba1\u7406\u30fb\u30d0\u30fc\u30b8\u30e7\u30f3\u7af6\u5408\u306e\u5168\u5bfe\u7b56<\/a\n    >\u300f\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\uff09\u7279\u306b2.x\u304b\u3089\u306e\u79fb\u884c\u3067\u5fd8\u308c\u304c\u3061\u3067\u3059\u3002\n  <\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u4f9d\u5b58\u30e9\u30a4\u30d6\u30e9\u30ea<\/strong><br \/>\n      \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u5229\u7528\u3059\u308b\u5916\u90e8\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u7fa4\u3002\u30d0\u30fc\u30b8\u30e7\u30f3\u9055\u3044\u304c\u3042\u308b\u3068\u52d5\u4f5c\u4e0d\u826f\u3084\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u306b\u306a\u308b\u3002\n    <\/p>\n<\/blockquote>\n<p>\n    <strong>\u89e3\u6c7a\u30b3\u30fc\u30c9\u4f8b (Maven &#8211; <strong>pom.xml<\/strong>):<\/strong>\n  <\/p>\n<pre><code>&lt;dependency&gt;\r\n    &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;spring-boot-starter-validation&lt;\/artifactId&gt;\r\n&lt;\/dependency&gt;\r\n<\/code><\/pre>\n<p>\n    <strong>\u89e3\u6c7a\u30b3\u30fc\u30c9\u4f8b (Gradle &#8211; <strong>build.gradle<\/strong>):<\/strong>\n  <\/p>\n<pre><code>dependencies {\r\n    implementation 'org.springframework.boot:spring-boot-starter-validation'\r\n}\r\n<\/code><\/pre>\n<h4>3. <strong>BindingResult<\/strong> \u3092\u5f15\u6570\u306b\u8ffd\u52a0\u3057\u5fd8\u308c\u3066\u3044\u307e\u305b\u3093\u304b\uff1f<\/h4>\n<p>\n    <strong><strong> @Valid<\/strong><\/strong\n    >\u5f15\u6570\u306e\u76f4\u5f8c\u306b<strong><strong>BindingResult<\/strong><\/strong\n    >\u304c\u306a\u3044\u3068\u3001\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30a8\u30e9\u30fc\u6642\u306b<strong>MethodArgumentNotValidException<\/strong>\u304c\u30b9\u30ed\u30fc\u3055\u308c\u3001\u30a8\u30e9\u30fc\u60c5\u5831\u3092\u76f4\u63a5\u6271\u3048\u307e\u305b\u3093\u3002\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u306b\u306f\u5fc5\u8981\u3067\u3059\u3002\n  <\/p>\n<p><strong>\u89e3\u6c7a\u30b3\u30fc\u30c9\u4f8b:<\/strong><\/p>\n<pre><code>import jakarta.validation.Valid;\r\nimport org.springframework.http.ResponseEntity;\r\nimport org.springframework.validation.BindingResult;\r\nimport org.springframework.web.bind.annotation.PostMapping;\r\nimport org.springframework.web.bind.annotation.RequestBody;\r\nimport org.springframework.web.bind.annotation.RestContruller;\r\n\r\n @RestContruller\r\npublic class UserContruller {\r\n    @PostMapping(\"\/users\")\r\n    public ResponseEntity&lt;String&gt; createUser( @Valid @RequestBody UserRequestDto userDto, BindingResult bindingResult) {\r\n        if (bindingResult.hasErrors()) {\r\n            StringBuilder errorMessage = new StringBuilder(\"Validation failed: \");\r\n            bindingResult.getAllErrors().forEach(error -&gt; errorMessage.append(error.getDefaultMessage()).append(\"; \"));\r\n            return ResponseEntity.badRequest().body(errorMessage.toString());\r\n        }\r\n        return ResponseEntity.ok(\"User created successfully\");\r\n    }\r\n}\r\n<\/code><\/pre>\n<hr \/>\n<h2>\u3010\u5b8c\u5168\u7248\u30b3\u30fc\u30c9\u3011DTO\u304b\u3089\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u307e\u3067\u3001\u3053\u308c\u3067\u52d5\u304fContruller<\/h2>\n<p>\u3053\u308c\u307e\u3067\u306e\u539f\u56e0\u3092\u8e0f\u307e\u3048\u3001DTO\u5b9a\u7fa9\u304b\u3089Contruller\u3067\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u53d7\u4ed8\u3001\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u307e\u3067\u3092\u7db2\u7f85\u3057\u305f\u5b8c\u5168\u7248\u30b3\u30fc\u30c9\u3067\u3059\u3002\u30b3\u30d4\u30da\u3067\u52d5\u4f5c\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<h4>1. DTO\uff08Data Transfer Object\uff09\u306e\u5b9a\u7fa9<\/h4>\n<pre><code>import jakarta.validation.constraints.Email;\r\nimport jakarta.validation.constraints.NotBlank;\r\nimport jakarta.validation.constraints.Size;\r\n\r\npublic class UserRequestDto {\r\n    @NotBlank(message = \"\u30e6\u30fc\u30b6\u30fc\u540d\u306f\u5fc5\u9808\u3067\u3059\")\r\n    @Size(min = 3, max = 20, message = \"\u30e6\u30fc\u30b6\u30fc\u540d\u306f3\u6587\u5b57\u4ee5\u4e0a20\u6587\u5b57\u4ee5\u5185\u3067\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\")\r\n    private String username;\r\n    @NotBlank(message = \"\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306f\u5fc5\u9808\u3067\u3059\")\r\n    @Email(message = \"\u6709\u52b9\u306a\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u5f62\u5f0f\u3067\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\")\r\n    private String email;\r\n    @NotBlank(message = \"\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u5fc5\u9808\u3067\u3059\")\r\n    @Size(min = 8, message = \"\u30d1\u30b9\u30ef\u30fc\u30c9\u306f8\u6587\u5b57\u4ee5\u4e0a\u3067\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\")\r\n    private String password;\r\n    \/\/ \u7701\u7565: Getter, Setter\r\n    public String getUsername() { return username; }\r\n    public void setUsername(String username) { this.username = username; }\r\n    public String getEmail() { return email; }\r\n    public void setEmail(String email) { this.email = email; }\r\n    public String getPassword() { return password; }\r\n    public void setPassword(String password) { this.password = password; }\r\n}\r\n<\/code><\/pre>\n<h4>2. Contruller\u3067\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u53d7\u4ed8\u3068\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0<\/h4>\n<pre><code>import jakarta.validation.Valid;\r\nimport org.springframework.http.HttpStatus;\r\nimport org.springframework.http.ResponseEntity;\r\nimport org.springframework.validation.BindingResult;\r\nimport org.springframework.validation.FieldError;\r\nimport org.springframework.web.bind.annotation.PostMapping;\r\nimport org.springframework.web.bind.annotation.RequestBody;\r\nimport org.springframework.web.bind.annotation.RestContruller;\r\nimport java.util.HashMap;\r\nimport java.util.Map;\r\n\r\n @RestContruller\r\npublic class RegistrationContruller {\r\n    @PostMapping(\"\/register\")\r\n    public ResponseEntity&lt;?&gt; registerUser( @Valid @RequestBody UserRequestDto userRequestDto, BindingResult bindingResult) {\r\n        if (bindingResult.hasErrors()) {\r\n            Map&lt;String, String&gt; errors = new HashMap&lt;&gt;();\r\n            for (FieldError error : bindingResult.getFieldErrors()) {\r\n                errors.put(error.getField(), error.getDefaultMessage());\r\n            }\r\n            return new ResponseEntity&lt;&gt;(errors, HttpStatus.BAD_REQUEST);\r\n        }\r\n        System.out.println(\"\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u6210\u529f: \" + userRequestDto.getUsername());\r\n        return new ResponseEntity&lt;&gt;(\"\u30e6\u30fc\u30b6\u30fc\u304c\u6b63\u5e38\u306b\u767b\u9332\u3055\u308c\u307e\u3057\u305f\", HttpStatus.CREATED);\r\n    }\r\n}\r\n<\/code><\/pre>\n<h4>3. (\u88dc\u8db3) \u30b0\u30ed\u30fc\u30d0\u30eb\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u306e\u5c0e\u5165\uff08\u767a\u5c55\u7684\uff09<\/h4>\n<p>\n    \u3059\u3079\u3066\u306e<strong>Contruller<\/strong>\u3067<strong><strong>BindingResult<\/strong><\/strong\n    >\u8a18\u8ff0\u304c\u7169\u96d1\u306a\u3089\u3001<strong><strong> @ContrullerAdvice<\/strong><\/strong\n    >\u3068<strong><strong>@ExceptionHandler<\/strong><\/strong\n    >\u3067\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30a8\u30e9\u30fc\u3092\u4e00\u5143\u51e6\u7406\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001<strong>Contruller<\/strong>\u306e\u30b3\u30fc\u30c9\u304c\u30af\u30ea\u30fc\u30f3\u306b\u306a\u308a\u307e\u3059\u3002\n  <\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u8a2d\u8a08\u601d\u60f3<\/strong><br \/>\n      \u30b7\u30b9\u30c6\u30e0\u3084\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u3069\u306e\u3088\u3046\u306a\u65b9\u91dd\u30fb\u30eb\u30fc\u30eb\u3067\u4f5c\u308b\u304b\u3068\u3044\u3046\u8003\u3048\u65b9\u3002\u518d\u5229\u7528\u6027\u3084\u4fdd\u5b88\u6027\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306a\u3069\u306b\u5927\u304d\u304f\u5f71\u97ff\u3059\u308b\u3002\n    <\/p>\n<\/blockquote>\n<pre><code>import org.springframework.http.HttpStatus;\r\nimport org.springframework.http.ResponseEntity;\r\nimport org.springframework.validation.FieldError;\r\nimport org.springframework.web.bind.MethodArgumentNotValidException;\r\nimport org.springframework.web.bind.annotation.ContrullerAdvice;\r\nimport org.springframework.web.bind.annotation.ExceptionHandler;\r\nimport java.util.HashMap;\r\nimport java.util.Map;\r\n\r\n @ContrullerAdvice\r\npublic class GlobalExceptionHandler {\r\n    @ExceptionHandler(MethodArgumentNotValidException.class)\r\n    public ResponseEntity&lt;Map&lt;String, String&gt;&gt; handleValidationExceptions(MethodArgumentNotValidException ex) {\r\n        Map&lt;String, String&gt; errors = new HashMap&lt;&gt;();\r\n        ex.getBindingResult().getAllErrors().forEach((error) -&gt; {\r\n            String fieldName = ((FieldError) error).getField();\r\n            String errorMessage = error.getDefaultMessage();\r\n            errors.put(fieldName, errorMessage);\r\n        });\r\n        return new ResponseEntity&lt;&gt;(errors, HttpStatus.BAD_REQUEST);\r\n    }\r\n}\r\n<\/code><\/pre>\n<p>\n    \u3053\u306e\u8a2d\u5b9a\u5f8c\u3001<strong><strong>RegistrationContruller<\/strong><\/strong\n    >\u3067\u306f<strong><strong>BindingResult<\/strong><\/strong\n    >\u5f15\u6570\u306a\u3057\u3067\u8a18\u8ff0\u3067\u304d\u307e\u3059\u3002\n  <\/p>\n<hr \/>\n<h2>\u306a\u305c\u52b9\u304b\u306a\u3044\uff1fSpring Boot \u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u57fa\u672c\u7684\u306a\u4ed5\u7d44\u307f\u3092\u518d\u78ba\u8a8d<\/h2>\n<p>\u554f\u984c\u89e3\u6c7a\u5f8c\u3001\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u4ed5\u7d44\u307f\u3092\u7406\u89e3\u3057\u307e\u3057\u3087\u3046\u3002\u4eca\u5f8c\u306e\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<h3>Bean Validation\u306e\u5f79\u5272\u3068 <strong> @Valid<\/strong> \/ <strong> @Validated<\/strong> \u306e\u5fc5\u9808\u6027<\/h3>\n<p>\n    Spring Boot\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306f\u3001Java\u6a19\u6e96\u306e<strong>Bean Validation<\/strong>\uff08<strong>Jakarta Validation<\/strong>\uff09\u306b\u57fa\u3065\u304d\u307e\u3059\u3002\uff08\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u57fa\u790e\u77e5\u8b58\u306b\u3064\u3044\u3066\u306f\u300e<a\n      href=\"https:\/\/route-zero.com\/recruit\/route\/1115\/\"\n      >Spring Boot \u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u5165\u9580\uff5cMVC\u7d71\u5408\u3068\u30ab\u30b9\u30bf\u30e0\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u5b9f\u8df5\u4f8b<\/a\n    >\u300f\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\uff09<strong><strong> @Valid<\/strong><\/strong\n    >\u3084<strong><strong>@Validated<\/strong><\/strong\n    >\u306f\u3001Spring Framework\u304cBean Validation\u306e\u5b9f\u88c5\u306b\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u5b9f\u884c\u3092\u6307\u793a\u3059\u308b\u30c8\u30ea\u30ac\u30fc\u3067\u3059\u3002\u3053\u308c\u304c\u306a\u3044\u3068\u3001DTO\u5185\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306f\u7121\u8996\u3055\u308c\u307e\u3059\u3002<strong><strong> @Valid<\/strong><\/strong\n    >\u306f\u6a19\u6e96\u3001<strong><strong>@Validated<\/strong><\/strong\n    >\u306fSpring\u72ec\u81ea\u3067\u30b0\u30eb\u30fc\u30d7\u6307\u5b9a\u304c\u53ef\u80fd\u3067\u3059\u3002\n  <\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aJava<\/strong><br \/>\n      \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306e\u4e00\u3064\u3002\u5927\u898f\u6a21\u30b7\u30b9\u30c6\u30e0\u3084Web\u30a2\u30d7\u30ea\u3001\u30e2\u30d0\u30a4\u30eb\u30a2\u30d7\u30ea\u306a\u3069\u5e45\u5e83\u3044\u5206\u91ce\u3067\u5229\u7528\u3055\u308c\u3066\u3044\u308b\u3002\n    <\/p>\n<\/blockquote>\n<h3>\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u51e6\u7406\u304c\u5b9f\u884c\u3055\u308c\u308b\u30c8\u30ea\u30ac\u30fc\u3068\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb<\/h3>\n<p>WebAPI\u30ea\u30af\u30a8\u30b9\u30c8\u304b\u3089\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u51e6\u7406\u307e\u3067\u306e\u6d41\u308c\uff1a<\/p>\n<ul>\n<li><strong>\u30ea\u30af\u30a8\u30b9\u30c8\u53d7\u4fe1<\/strong>: HTTP\u30ea\u30af\u30a8\u30b9\u30c8\u5230\u7740\u3002<\/li>\n<li>\n      <strong>\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0<\/strong>: <strong><strong>DispatcherServlet<\/strong><\/strong\n      >\u304c<strong>Contruller<\/strong>\u30e1\u30bd\u30c3\u30c9\u3092\u7279\u5b9a\u3002\uff08Spring Boot\u306eMVC\u69cb\u6210\u306b\u3064\u3044\u3066\u306f\u300e<a href=\"https:\/\/route-zero.com\/recruit\/route\/1269\/\"\n        >MVC\u69cb\u6210\u3092\u7406\u89e3\u3059\u308c\u3070\u73fe\u5834\u3067\u8a70\u307e\u3089\u306a\u3044 | Spring Boot\u5b9f\u88c5\u30ac\u30a4\u30c9<\/a\n      >\u300f\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\uff09\n    <\/li>\n<li><strong>\u30e1\u30c3\u30bb\u30fc\u30b8\u5909\u63db<\/strong>: \u30ea\u30af\u30a8\u30b9\u30c8\u30dc\u30c7\u30a3\u304cDTO\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db\u3002<\/li>\n<li>\n      <strong>\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u5b9f\u884c<\/strong>: (<strong><strong> @Valid<\/strong><\/strong\n      >\u304c\u3042\u308b\u5834\u5408) <strong>Bean Validation<\/strong>\u304c\u5236\u7d04\u3092\u691c\u8a3c\u3002\n    <\/li>\n<li>\n      <strong>\u7d50\u679c\u51e6\u7406<\/strong>: \u30a8\u30e9\u30fc\u306a\u3057\u306a\u3089<strong>Contruller<\/strong>\u5b9f\u884c\u3002\u30a8\u30e9\u30fc\u3042\u308a\u306a\u3089<strong><strong>BindingResult<\/strong><\/strong\n      >\u306b\u30a8\u30e9\u30fc\u683c\u7d0d\uff08\u3042\u308c\u3070\uff09\u304b\u3001<strong><strong>MethodArgumentNotValidException<\/strong><\/strong\n      >\u30b9\u30ed\u30fc\uff08\u30c7\u30d5\u30a9\u30eb\u30c8400 Bad Request\u3001\u307e\u305f\u306f\u30b0\u30ed\u30fc\u30d0\u30eb\u30cf\u30f3\u30c9\u30e9\u30fc\u3067\u51e6\u7406\uff09\u3002\n    <\/li>\n<\/ul>\n<hr \/>\n<h2>\u3010\u89e3\u6c7a\u7b56\u3011\u3042\u306a\u305f\u306e\u30b1\u30fc\u30b9\u306f\u3069\u308c\uff1f\u3088\u304f\u3042\u308b3\u3064\u306e\u539f\u56e0\u3068\u5177\u4f53\u7684\u306a\u5bfe\u51e6\u6cd5<\/h2>\n<p>\u6700\u901f\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8\u3067\u89e3\u6c7a\u3057\u306a\u304b\u3063\u305f\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u8a73\u7d30\u306a\u539f\u56e0\u3068\u5bfe\u51e6\u6cd5\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3>1. <strong> @Valid<\/strong> \u307e\u305f\u306f <strong> @Validated<\/strong> \u3092\u5fd8\u308c\u3066\u3044\u307e\u305b\u3093\u304b\uff1f<\/h3>\n<p>\u6700\u3082\u983b\u7e41\u306b\u898b\u3089\u308c\u308b\u9593\u9055\u3044\u3067\u3059\u3002\u3053\u308c\u3089\u306e\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306f\u3001Spring\u304c<strong>Bean Validation<\/strong>\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u300c\u65d7\u300d\u3067\u3059\u3002<\/p>\n<h4>\u5177\u4f53\u7684\u306a\u78ba\u8a8d\u70b9\u3068\u5bfe\u51e6\u6cd5:<\/h4>\n<ul>\n<li>\n      <strong>Contruller\u30e1\u30bd\u30c3\u30c9\u306e\u5f15\u6570<\/strong>: DTO\u5f15\u6570\u306b\u5fc5\u305a<strong><strong> @Valid<\/strong><\/strong\n      >\u307e\u305f\u306f<strong><strong>@Validated<\/strong><\/strong\n      >\u3092\u4ed8\u4e0e\u3002\n    <\/li>\n<li>\n      <strong>\u30cd\u30b9\u30c8\u3055\u308c\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3<\/strong>: DTO\u5185\u306e\u30cd\u30b9\u30c8\u3055\u308c\u305fDTO\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u3082<strong><strong> @Valid<\/strong><\/strong\n      >\u3092\u4ed8\u4e0e\u3002\n    <\/li>\n<\/ul>\n<h3>2. <strong>BindingResult<\/strong> \u3092\u5f15\u6570\u306b\u8ffd\u52a0\u3057\u5fd8\u308c\u3066\u3044\u307e\u305b\u3093\u304b\uff1f\uff08\u30b0\u30ed\u30fc\u30d0\u30eb\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u306e\u9078\u629e\u80a2\u3082\uff09<\/h3>\n<p>\n    \u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30a8\u30e9\u30fc\u3092<strong>Contruller<\/strong>\u30e1\u30bd\u30c3\u30c9\u5185\u3067\u76f4\u63a5\u51e6\u7406\u3057\u305f\u3044\u5834\u5408\u3001<strong><strong>BindingResult<\/strong><\/strong\n    >\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u5fc5\u9808\u3067\u3059\u3002\n  <\/p>\n<h4>\u5177\u4f53\u7684\u306a\u78ba\u8a8d\u70b9\u3068\u5bfe\u51e6\u6cd5:<\/h4>\n<ul>\n<li>\n      <strong>Contruller\u30e1\u30bd\u30c3\u30c9\u306e\u5f15\u6570\u9806\u5e8f<\/strong>: <strong><strong>BindingResult<\/strong><\/strong\n      >\u306f<strong><strong> @Valid<\/strong><\/strong\n      >\u5f15\u6570\u306e\u300c\u76f4\u5f8c\u300d\u306b\u914d\u7f6e\u3002\n    <\/li>\n<li>\n      <strong>\u30b0\u30ed\u30fc\u30d0\u30eb\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u306e\u6d3b\u7528<\/strong>: <strong><strong> @ContrullerAdvice<\/strong><\/strong\n      >\u3068<strong><strong>@ExceptionHandler<\/strong><\/strong\n      >\u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5168\u4f53\u306e\u30a8\u30e9\u30fc\u51e6\u7406\u3092\u4e00\u5143\u5316\u3002<strong>Contruller<\/strong>\u304b\u3089<strong><strong>BindingResult<\/strong><\/strong\n      >\u3092\u6392\u9664\u3057\u3001\u30b3\u30fc\u30c9\u3092\u30af\u30ea\u30fc\u30f3\u306b\u4fdd\u3066\u307e\u3059\u3002\n    <\/li>\n<\/ul>\n<h3>3. <strong>spring-boot-starter-validation<\/strong> \u306e\u4f9d\u5b58\u95a2\u4fc2\u304c\u4e0d\u8db3\u3057\u3066\u3044\u307e\u305b\u3093\u304b\uff1f<\/h3>\n<p>\n    Spring Boot 3.x\u306f<strong>Jakarta EE<\/strong>\u3078\u79fb\u884c\u3057\u3001\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u5b9f\u88c5\u3082<strong><strong>jakarta.validation<\/strong><\/strong\n    >\u306b\u5909\u308f\u308a\u307e\u3057\u305f\u3002<strong><strong>spring-boot-starter-validation<\/strong><\/strong\n    >\u3092\u660e\u793a\u7684\u306b\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\n  <\/p>\n<h4>\u5177\u4f53\u7684\u306a\u78ba\u8a8d\u70b9\u3068\u5bfe\u51e6\u6cd5:<\/h4>\n<ul>\n<li>\n      <strong><strong>pom.xml<\/strong> (Maven) \u307e\u305f\u306f <strong>build.gradle<\/strong> (Gradle) \u306e\u78ba\u8a8d<\/strong>: \u4f9d\u5b58\u95a2\u4fc2\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3002\n    <\/li>\n<li>\n      <strong>\u30a4\u30f3\u30dd\u30fc\u30c8\u6587\u306e\u78ba\u8a8d<\/strong>: Spring Boot 3.x\u306e\u5834\u5408\u3001\u30a4\u30f3\u30dd\u30fc\u30c8\u6587\u304c<strong><strong>jakarta.validation.constraints<\/strong><\/strong\n      >\u304b\u3089\u59cb\u307e\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3002<strong><strong>javax.validation.constraints<\/strong><\/strong\n      >\u3067\u3042\u308c\u3070\u4fee\u6b63\u3002\n    <\/li>\n<\/ul>\n<hr \/>\n<h2>\u3010Q&#038;A\u3011Spring Boot \u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u300c\u56f0\u3063\u305f\u300d\u3092\u89e3\u6d88\uff01<\/h2>\n<p>Spring Boot\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306b\u95a2\u3059\u308b\u3088\u304f\u3042\u308b\u7591\u554f\u3068\u305d\u306e\u56de\u7b54\u3067\u3059\u3002<\/p>\n<h3>Q1: <strong>BindingResult<\/strong>\u306f\u306a\u305c\u5fc5\u8981\uff1f\u30a8\u30e9\u30fc\u60c5\u5831\u306f\u3069\u3053\u3067\u53d7\u3051\u53d6\u308b\uff1f<\/h3>\n<p>\n    <strong>A1:<\/strong> <strong><strong>BindingResult<\/strong><\/strong\n    >\u306f\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30a8\u30e9\u30fc\u60c5\u5831\u3092\u4fdd\u6301\u3057\u307e\u3059\u3002<strong><strong> @Valid<\/strong><\/strong\n    >\u5f15\u6570\u306e\u76f4\u5f8c\u306b\u5ba3\u8a00\u3059\u308b\u3068\u3001\u4f8b\u5916\u30b9\u30ed\u30fc\u3092\u9632\u304e\u3001\u30a8\u30e9\u30fc\u5185\u5bb9\u3092\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<strong><strong>getAllErrors()<\/strong><\/strong\n    >\u3084<strong><strong>getFieldErrors()<\/strong><\/strong\n    >\u3067\u30a8\u30e9\u30fc\u60c5\u5831\u3092\u53d6\u5f97\u53ef\u80fd\u3067\u3059\u3002\n  <\/p>\n<h3>Q2: <strong> @Valid<\/strong> \u3068 <strong> @Validated<\/strong>\u3001\u3069\u3046\u4f7f\u3044\u5206\u3051\u308b\u306e\u304c\u6b63\u89e3\uff1f<\/h3>\n<p>\n    <strong>A2:<\/strong> \u57fa\u672c\u306f<strong>Bean Validation<\/strong>\u6a19\u6e96\u306e<strong><strong> @Valid<\/strong><\/strong\n    >\u3092\u4f7f\u7528\u3002\u7279\u5b9a\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30eb\u30fc\u30eb\u3092\u9069\u7528\u3059\u308b\u300c\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30b0\u30eb\u30fc\u30d7\u300d\u3092\u4f7f\u7528\u3057\u305f\u3044\u5834\u5408\u306b\u3001Spring\u72ec\u81ea\u306e<strong><strong>@Validated<\/strong><\/strong\n    >\u3092\u4f7f\u3044\u307e\u3059\u3002\n  <\/p>\n<h3>Q3: \u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30a8\u30e9\u30fc\u6642\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u65b9\u6cd5<\/h3>\n<p><strong>A3:<\/strong><\/p>\n<ul>\n<li>\n      <strong>\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306b\u76f4\u63a5\u6307\u5b9a<\/strong>: <strong><strong> @NotBlank(message = &#8220;\u540d\u524d\u306f\u7a7a\u306b\u3067\u304d\u307e\u305b\u3093&#8221;)<\/strong><\/strong>\n    <\/li>\n<li>\n      <strong><strong>ValidationMessages.properties<\/strong><\/strong> \u30d5\u30a1\u30a4\u30eb: <strong>src\/main\/resources\/ValidationMessages.properties<\/strong>\u3067\u30ad\u30fc\u3068\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u5b9a\u7fa9\u3002\n    <\/li>\n<\/ul>\n<h3>Q4: \u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u304c\u52b9\u3044\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3059\u308b\u30c7\u30d0\u30c3\u30b0\u306e\u30b3\u30c4<\/h3>\n<p><strong>A4:<\/strong><\/p>\n<ul>\n<li>\n      <strong>\u30ed\u30b0\u30ec\u30d9\u30eb\u8abf\u6574<\/strong>: <strong>application.properties<\/strong>\u3067<strong><strong>org.springframework.validation<\/strong><\/strong\n      >\u3084<strong><strong>org.hibernate.validator<\/strong><\/strong\n      >\u306e\u30ed\u30b0\u30ec\u30d9\u30eb\u3092<strong><strong>DEBUG<\/strong><\/strong\n      >\u306b\u8a2d\u5b9a\u3002\n    <\/li>\n<li>\n      <strong>\u30d6\u30ec\u30fc\u30af\u30dd\u30a4\u30f3\u30c8\u8a2d\u5b9a<\/strong>: <strong>Contruller<\/strong>\u30e1\u30bd\u30c3\u30c9\u3084<strong><strong>BindingResult.hasErrors()<\/strong><\/strong\n      >\u306b\u30d6\u30ec\u30fc\u30af\u30dd\u30a4\u30f3\u30c8\u3092\u7f6e\u304d\u3001\u30c7\u30d0\u30c3\u30ac\u30fc\u3067<strong><strong>BindingResult<\/strong><\/strong\n      >\u306e\u4e2d\u8eab\u3092\u78ba\u8a8d\u3002\n    <\/li>\n<li><strong>\u610f\u56f3\u7684\u306a\u30a8\u30e9\u30fc<\/strong>: \u4e0d\u6b63\u306a\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u308a\u3001\u671f\u5f85\u901a\u308a\u306e\u30a8\u30e9\u30fc\u30ec\u30b9\u30dd\u30f3\u30b9\u304b\u30ed\u30b0\u3092\u78ba\u8a8d\u3002<\/li>\n<\/ul>\n<h3>Q5: Spring Boot 2.x\u304b\u30893.x\u3078\u306e\u79fb\u884c\u3067\u6ce8\u610f\u3059\u3079\u304d\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u5909\u66f4\u70b9\u306f\uff1f<\/h3>\n<p><strong>A5:<\/strong> \u4e3b\u306a\u5909\u66f4\u70b9\u306f\u4ee5\u4e0b\u3002<\/p>\n<ul>\n<li>\n      <strong>\u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u306e\u5909\u66f4<\/strong>: <strong><strong>javax.validation.*<\/strong><\/strong\n      >\u304b\u3089<strong><strong>jakarta.validation.*<\/strong><\/strong\n      >\u3078\u3002\u30b3\u30fc\u30c9\u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u6587\u3092\u4fee\u6b63\u3002\n    <\/li>\n<li>\n      <strong>\u4f9d\u5b58\u95a2\u4fc2\u306e\u660e\u793a\u7684\u306a\u8ffd\u52a0<\/strong>: <strong><strong>spring-boot-starter-validation<\/strong><\/strong\n      >\u3092<strong>pom.xml<\/strong>\u3084<strong>build.gradle<\/strong>\u306b\u660e\u793a\u7684\u306b\u8ffd\u52a0\u3002\n    <\/li>\n<\/ul>\n<hr \/>\n<h2>\u6b21\u306e\u30b9\u30c6\u30c3\u30d7\u3078\uff01Spring Boot \u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u30de\u30b9\u30bf\u30fc\u3059\u308b\u305f\u3081\u306e\u5b66\u7fd2\u30ea\u30bd\u30fc\u30b9<\/h2>\n<p>\u554f\u984c\u89e3\u6c7a\u5f8c\u3001\u3055\u3089\u306b\u77e5\u8b58\u3092\u6df1\u3081\u308b\u3053\u3068\u3067\u3001\u3088\u308a\u5805\u7262\u306a\u30a2\u30d7\u30ea\u3092\u69cb\u7bc9\u3067\u304d\u307e\u3059\u3002<\/p>\n<ul>\n<li><strong>\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/strong>: Spring Boot\u304a\u3088\u3073<strong>Bean Validation<\/strong>\u306e\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u6982\u5ff5\u3092\u7406\u89e3\u3002<\/li>\n<li>\n      <strong>\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30b0\u30eb\u30fc\u30d7\u306e\u6d3b\u7528<\/strong>: <strong><strong> @Validated<\/strong><\/strong\n      >\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u5b66\u7fd2\u3002\n    <\/li>\n<li><strong>\u30ab\u30b9\u30bf\u30e0\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3<\/strong>: \u72ec\u81ea\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u4f5c\u6210\u3002<\/li>\n<li><strong>\u56fd\u969b\u5316\uff08i18n\uff09\u5bfe\u5fdc<\/strong>: \u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u591a\u8a00\u8a9e\u5bfe\u5fdc\u3002<\/li>\n<\/ul>\n<hr \/>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001Spring Boot\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u304c\u300c\u52b9\u304b\u306a\u3044\u300d\u72b6\u6cc1\u304b\u3089\u8131\u5374\u3059\u308b\u305f\u3081\u3001\u4ee5\u4e0b\u306e\u89e3\u6c7a\u7b56\u3068\u77e5\u8b58\u3092\u63d0\u4f9b\u3057\u307e\u3057\u305f\u3002<\/p>\n<ul>\n<li>\n      <strong>\u6700\u901f\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8<\/strong>: \u3088\u304f\u3042\u308b3\u3064\u306e\u539f\u56e0\uff08<strong><strong> @Valid\/@Validated<\/strong><\/strong\n      >\u4e0d\u8db3\u3001<strong><strong>spring-boot-starter-validation<\/strong><\/strong\n      >\u6b20\u843d\u3001<strong><strong>BindingResult<\/strong><\/strong\n      >\u4e0d\u4f7f\u7528\uff09\u3068\u89e3\u6c7a\u30b3\u30fc\u30c9\u3002\n    <\/li>\n<li><strong>\u5b8c\u5168\u7248Contruller\u30b3\u30fc\u30c9<\/strong>: DTO\u304b\u3089\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u307e\u3067\u7db2\u7f85\u3002<\/li>\n<li><strong>\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u4ed5\u7d44\u307f<\/strong>: <strong>Bean Validation<\/strong>\u306e\u5f79\u5272\u3084\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb\u3002<\/li>\n<li><strong>Q&#038;A<\/strong>: \u958b\u767a\u4e2d\u306e\u7591\u554f\u70b9\u3092\u89e3\u6d88\u3002<\/li>\n<\/ul>\n<p>\u4eca\u3067\u306f\u3001\u81ea\u4fe1\u3092\u6301\u3063\u3066Spring Boot\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u3044\u3053\u306a\u3057\u3001\u9ad8\u54c1\u8cea\u306aWebAPI\u3092\u958b\u767a\u3067\u304d\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<hr \/>\n<\/div>\n","protected":false},"featured_media":1895,"template":"","_links":{"self":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/route\/1894"}],"collection":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/route"}],"about":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/types\/route"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/media\/1895"}],"wp:attachment":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/media?parent=1894"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}