teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

追記

2024/04/10 08:09

投稿

ngk10
ngk10

スコア8

title CHANGED
File without changes
body CHANGED
@@ -80,9 +80,40 @@
80
80
  </body>
81
81
  </html>
82
82
  ```
83
+ entity
84
+ ```java
83
85
 
86
+ import lombok.Data;
84
87
 
88
+ @Data
89
+ public class product {
90
+
91
+ private final String name;
92
+ private final String categoryName;
93
+ private final String quantity;
94
+ }
95
+ ```
96
+ form
97
+ ```java
85
98
 
99
+ import java.util.List;
100
+
101
+ import com.example.jrOrder.entity.category;
102
+ import com.example.jrOrder.entity.product;
103
+
104
+ import lombok.Data;
105
+
106
+ @Data
107
+ public class orderForm {
108
+ private int CategoryCd;
109
+ private List<category> categoryList;
110
+ private List<product> productList;
111
+ }
112
+ ```
113
+
114
+
115
+
116
+
86
117
  controller
87
118
  ```java
88
119
  package com.example.jrOrder.controller;
@@ -137,7 +168,6 @@
137
168
  return "order";
138
169
  }
139
170
  }
140
-
141
171
  ```
142
172
  Service
143
173
  ```java
@@ -168,7 +198,6 @@
168
198
  return productRepository.getCategoryList();
169
199
  }
170
200
  }
171
-
172
201
  ```
173
202
 
174
203
  Repository
@@ -190,7 +219,6 @@
190
219
  public List<category> getCategoryList();
191
220
 
192
221
  }
193
-
194
222
  ```
195
223
 
196
224
  sql