質問編集履歴
7
再度直しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -34,7 +34,9 @@
|
|
34
34
|
|
35
35
|
|
36
36
|
|
37
|
+
```Java
|
38
|
+
|
37
|
-
|
39
|
+
LoginController.java
|
38
40
|
|
39
41
|
|
40
42
|
|
@@ -156,11 +158,15 @@
|
|
156
158
|
|
157
159
|
|
158
160
|
|
159
|
-
|
161
|
+
```
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
160
|
-
|
167
|
+
```Java
|
161
|
-
|
162
|
-
|
168
|
+
|
163
|
-
|
169
|
+
UserRepository.java
|
164
170
|
|
165
171
|
package com.example.easylogin.model.dao;
|
166
172
|
|
@@ -192,9 +198,13 @@
|
|
192
198
|
|
193
199
|
|
194
200
|
|
195
|
-
|
201
|
+
```
|
202
|
+
|
203
|
+
|
204
|
+
|
196
|
-
|
205
|
+
```Java
|
206
|
+
|
197
|
-
|
207
|
+
User.java
|
198
208
|
|
199
209
|
package com.example.easylogin.model.entity;
|
200
210
|
|
@@ -312,9 +322,13 @@
|
|
312
322
|
|
313
323
|
|
314
324
|
|
315
|
-
|
325
|
+
```
|
326
|
+
|
327
|
+
|
328
|
+
|
316
|
-
|
329
|
+
```html
|
330
|
+
|
317
|
-
|
331
|
+
index.html
|
318
332
|
|
319
333
|
<!DOCTYPE html>
|
320
334
|
|
@@ -362,11 +376,17 @@
|
|
362
376
|
|
363
377
|
|
364
378
|
|
365
|
-
|
379
|
+
```
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
366
|
-
|
387
|
+
```html
|
367
|
-
|
368
|
-
|
388
|
+
|
369
|
-
|
389
|
+
login.html
|
370
390
|
|
371
391
|
<!DOCTYPE html>
|
372
392
|
|
@@ -392,7 +412,7 @@
|
|
392
412
|
|
393
413
|
</html>
|
394
414
|
|
395
|
-
|
415
|
+
|
396
416
|
|
397
417
|
```
|
398
418
|
|
6
すみません。おかしくなったのでまた直しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -190,222 +190,214 @@
|
|
190
190
|
|
191
191
|
}
|
192
192
|
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
```User.java
|
198
|
+
|
199
|
+
package com.example.easylogin.model.entity;
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
import javax.persistence.Column;
|
204
|
+
|
205
|
+
import javax.persistence.Entity;
|
206
|
+
|
207
|
+
import javax.persistence.GeneratedValue;
|
208
|
+
|
209
|
+
import javax.persistence.GenerationType;
|
210
|
+
|
211
|
+
import javax.persistence.Id;
|
212
|
+
|
213
|
+
import javax.persistence.Table;
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
@Entity
|
218
|
+
|
219
|
+
@Table(name="user")
|
220
|
+
|
221
|
+
public class User {
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
@Id
|
226
|
+
|
227
|
+
@Column(name = "id")
|
228
|
+
|
229
|
+
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
230
|
+
|
231
|
+
private long id;
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
@Column(name = "user_name")
|
236
|
+
|
237
|
+
private String userName;
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
@Column(name = "password")
|
242
|
+
|
243
|
+
private String password;
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
@Column(name = "full_name")
|
248
|
+
|
249
|
+
private String fullName;
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
public long getId() {
|
254
|
+
|
255
|
+
return id;
|
256
|
+
|
257
|
+
}
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
public void setId(long id) {
|
262
|
+
|
263
|
+
this.id= id;
|
264
|
+
|
265
|
+
}
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
public String getUserName() {
|
270
|
+
|
271
|
+
return userName;
|
272
|
+
|
273
|
+
}
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
public void SetUserName(String userName)
|
278
|
+
|
279
|
+
{
|
280
|
+
|
281
|
+
this.userName = userName;
|
282
|
+
|
283
|
+
}
|
284
|
+
|
285
|
+
public String getPassword() {
|
286
|
+
|
287
|
+
return password;
|
288
|
+
|
289
|
+
}
|
290
|
+
|
291
|
+
public void setPassword(String password) {
|
292
|
+
|
293
|
+
this.password = password;
|
294
|
+
|
295
|
+
}
|
296
|
+
|
297
|
+
public String getFullName() {
|
298
|
+
|
299
|
+
return fullName;
|
300
|
+
|
301
|
+
}
|
302
|
+
|
303
|
+
public void setFullName(String fullName) {
|
304
|
+
|
305
|
+
this.fullName = fullName;
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
}
|
310
|
+
|
311
|
+
}
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
```index.html
|
318
|
+
|
319
|
+
<!DOCTYPE html>
|
320
|
+
|
321
|
+
<html xmlns:th="http://www.thymeleaf.org">
|
322
|
+
|
323
|
+
<head>
|
324
|
+
|
325
|
+
<meta charset="UTF-8"/>
|
326
|
+
|
327
|
+
<title>Insert title here</title>
|
328
|
+
|
329
|
+
</head>
|
330
|
+
|
331
|
+
<body>
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
<form name="LoginForm" action="/Login">
|
336
|
+
|
337
|
+
<div>
|
338
|
+
|
339
|
+
<span>User name</span>
|
340
|
+
|
341
|
+
<input type="text" name="userName" />
|
342
|
+
|
343
|
+
</div>
|
344
|
+
|
345
|
+
<div>
|
346
|
+
|
347
|
+
<span>Password</span>
|
348
|
+
|
349
|
+
<input type="password" name="password" />
|
350
|
+
|
351
|
+
</div>
|
352
|
+
|
353
|
+
<button type="submit">Login</button>
|
354
|
+
|
355
|
+
</form>
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
</body>
|
360
|
+
|
361
|
+
</html>
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
```login.html
|
370
|
+
|
371
|
+
<!DOCTYPE html>
|
372
|
+
|
373
|
+
<html xmlns:th="http://www.thymeleaf.org">
|
374
|
+
|
375
|
+
<head>
|
376
|
+
|
377
|
+
<meta charset="UTF-8"/>
|
378
|
+
|
379
|
+
<title>Insert title here</title>
|
380
|
+
|
381
|
+
</head>
|
382
|
+
|
383
|
+
<body>
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
<p th:text="$"{message}"/>
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
</body>
|
392
|
+
|
393
|
+
</html>
|
394
|
+
|
193
395
|
コード
|
194
396
|
|
195
397
|
```
|
196
398
|
|
197
399
|
|
198
400
|
|
199
|
-
```User.java
|
200
|
-
|
201
|
-
package com.example.easylogin.model.entity;
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
import javax.persistence.Column;
|
206
|
-
|
207
|
-
import javax.persistence.Entity;
|
208
|
-
|
209
|
-
import javax.persistence.GeneratedValue;
|
210
|
-
|
211
|
-
import javax.persistence.GenerationType;
|
212
|
-
|
213
|
-
import javax.persistence.Id;
|
214
|
-
|
215
|
-
import javax.persistence.Table;
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
@Entity
|
220
|
-
|
221
|
-
@Table(name="user")
|
222
|
-
|
223
|
-
public class User {
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
@Id
|
228
|
-
|
229
|
-
@Column(name = "id")
|
230
|
-
|
231
|
-
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
232
|
-
|
233
|
-
private long id;
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
@Column(name = "user_name")
|
238
|
-
|
239
|
-
private String userName;
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
@Column(name = "password")
|
244
|
-
|
245
|
-
private String password;
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
@Column(name = "full_name")
|
250
|
-
|
251
|
-
private String fullName;
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
public long getId() {
|
256
|
-
|
257
|
-
return id;
|
258
|
-
|
259
|
-
}
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
public void setId(long id) {
|
264
|
-
|
265
|
-
this.id= id;
|
266
|
-
|
267
|
-
}
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
public String getUserName() {
|
272
|
-
|
273
|
-
return userName;
|
274
|
-
|
275
|
-
}
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
public void SetUserName(String userName)
|
280
|
-
|
281
|
-
{
|
282
|
-
|
283
|
-
this.userName = userName;
|
284
|
-
|
285
|
-
}
|
286
|
-
|
287
|
-
public String getPassword() {
|
288
|
-
|
289
|
-
return password;
|
290
|
-
|
291
|
-
}
|
292
|
-
|
293
|
-
public void setPassword(String password) {
|
294
|
-
|
295
|
-
this.password = password;
|
296
|
-
|
297
|
-
}
|
298
|
-
|
299
|
-
public String getFullName() {
|
300
|
-
|
301
|
-
return fullName;
|
302
|
-
|
303
|
-
}
|
304
|
-
|
305
|
-
public void setFullName(String fullName) {
|
306
|
-
|
307
|
-
this.fullName = fullName;
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
}
|
312
|
-
|
313
|
-
}
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
コード
|
318
|
-
|
319
|
-
```
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
```index.html
|
324
|
-
|
325
|
-
<!DOCTYPE html>
|
326
|
-
|
327
|
-
<html xmlns:th="http://www.thymeleaf.org">
|
328
|
-
|
329
|
-
<head>
|
330
|
-
|
331
|
-
<meta charset="UTF-8"/>
|
332
|
-
|
333
|
-
<title>Insert title here</title>
|
334
|
-
|
335
|
-
</head>
|
336
|
-
|
337
|
-
<body>
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
<form name="LoginForm" action="/Login">
|
342
|
-
|
343
|
-
<div>
|
344
|
-
|
345
|
-
<span>User name</span>
|
346
|
-
|
347
|
-
<input type="text" name="userName" />
|
348
|
-
|
349
|
-
</div>
|
350
|
-
|
351
|
-
<div>
|
352
|
-
|
353
|
-
<span>Password</span>
|
354
|
-
|
355
|
-
<input type="password" name="password" />
|
356
|
-
|
357
|
-
</div>
|
358
|
-
|
359
|
-
<button type="submit">Login</button>
|
360
|
-
|
361
|
-
</form>
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
</body>
|
366
|
-
|
367
|
-
</html>
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
コード
|
372
|
-
|
373
|
-
```
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
### login.html
|
378
|
-
|
379
|
-
<!DOCTYPE html>
|
380
|
-
|
381
|
-
<html xmlns:th="http://www.thymeleaf.org">
|
382
|
-
|
383
|
-
<head>
|
384
|
-
|
385
|
-
<meta charset="UTF-8"/>
|
386
|
-
|
387
|
-
<title>Insert title here</title>
|
388
|
-
|
389
|
-
</head>
|
390
|
-
|
391
|
-
<body>
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
<p th:text="$"{message}"/>
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
</body>
|
400
|
-
|
401
|
-
</html>
|
402
|
-
|
403
|
-
コード
|
404
|
-
|
405
|
-
```
|
406
|
-
|
407
|
-
|
408
|
-
|
409
401
|
### 試したこと
|
410
402
|
|
411
403
|
|
5
すみません。おかしくなったのでまた直しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,7 +32,9 @@
|
|
32
32
|
|
33
33
|
|
34
34
|
|
35
|
+
|
36
|
+
|
35
|
-
|
37
|
+
```LoginController.java
|
36
38
|
|
37
39
|
|
38
40
|
|
@@ -154,167 +156,171 @@
|
|
154
156
|
|
155
157
|
|
156
158
|
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
```UserRepository.java
|
164
|
+
|
165
|
+
package com.example.easylogin.model.dao;
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
import java.util.List;
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
import org.springframework.data.jpa.repository.JpaRepository;
|
174
|
+
|
175
|
+
import org.springframework.stereotype.Repository;
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
import com.example.easylogin.model.entity.User;
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
@Repository
|
184
|
+
|
185
|
+
public interface UserRepository extends JpaRepository<User, Long> {
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
List<User> findByUserNameAndPassword(String userName, String password);
|
190
|
+
|
191
|
+
}
|
192
|
+
|
157
193
|
コード
|
158
194
|
|
159
195
|
```
|
160
196
|
|
161
197
|
|
162
198
|
|
163
|
-
|
164
|
-
|
165
|
-
package com.example.easylogin.model.
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
import java.
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
import
|
174
|
-
|
175
|
-
import
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
import
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
@
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
199
|
+
```User.java
|
200
|
+
|
201
|
+
package com.example.easylogin.model.entity;
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
import javax.persistence.Column;
|
206
|
+
|
207
|
+
import javax.persistence.Entity;
|
208
|
+
|
209
|
+
import javax.persistence.GeneratedValue;
|
210
|
+
|
211
|
+
import javax.persistence.GenerationType;
|
212
|
+
|
213
|
+
import javax.persistence.Id;
|
214
|
+
|
215
|
+
import javax.persistence.Table;
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
@Entity
|
220
|
+
|
221
|
+
@Table(name="user")
|
222
|
+
|
223
|
+
public class User {
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
@Id
|
228
|
+
|
229
|
+
@Column(name = "id")
|
230
|
+
|
231
|
+
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
232
|
+
|
233
|
+
private long id;
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
@Column(name = "user_name")
|
238
|
+
|
239
|
+
private String userName;
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
@Column(name = "password")
|
244
|
+
|
245
|
+
private String password;
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
@Column(name = "full_name")
|
250
|
+
|
251
|
+
private String fullName;
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
public long getId() {
|
256
|
+
|
257
|
+
return id;
|
258
|
+
|
259
|
+
}
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
public void setId(long id) {
|
264
|
+
|
265
|
+
this.id= id;
|
266
|
+
|
267
|
+
}
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
public String getUserName() {
|
272
|
+
|
273
|
+
return userName;
|
274
|
+
|
275
|
+
}
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
public void SetUserName(String userName)
|
280
|
+
|
281
|
+
{
|
282
|
+
|
283
|
+
this.userName = userName;
|
284
|
+
|
285
|
+
}
|
286
|
+
|
287
|
+
public String getPassword() {
|
288
|
+
|
289
|
+
return password;
|
290
|
+
|
291
|
+
}
|
292
|
+
|
293
|
+
public void setPassword(String password) {
|
294
|
+
|
295
|
+
this.password = password;
|
296
|
+
|
297
|
+
}
|
298
|
+
|
299
|
+
public String getFullName() {
|
300
|
+
|
301
|
+
return fullName;
|
302
|
+
|
303
|
+
}
|
304
|
+
|
305
|
+
public void setFullName(String fullName) {
|
306
|
+
|
307
|
+
this.fullName = fullName;
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
}
|
190
312
|
|
191
313
|
}
|
192
314
|
|
193
315
|
|
194
316
|
|
195
|
-
```User.java
|
196
|
-
|
197
|
-
package com.example.easylogin.model.entity;
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
import javax.persistence.Column;
|
202
|
-
|
203
|
-
import javax.persistence.Entity;
|
204
|
-
|
205
|
-
import javax.persistence.GeneratedValue;
|
206
|
-
|
207
|
-
import javax.persistence.GenerationType;
|
208
|
-
|
209
|
-
import javax.persistence.Id;
|
210
|
-
|
211
|
-
import javax.persistence.Table;
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
@Entity
|
216
|
-
|
217
|
-
@Table(name="user")
|
218
|
-
|
219
|
-
public class User {
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
317
|
+
コード
|
224
|
-
|
225
|
-
@Column(name = "id")
|
226
|
-
|
227
|
-
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
228
|
-
|
229
|
-
private long id;
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
@Column(name = "user_name")
|
234
|
-
|
235
|
-
private String userName;
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
@Column(name = "password")
|
240
|
-
|
241
|
-
private String password;
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
@Column(name = "full_name")
|
246
|
-
|
247
|
-
private String fullName;
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
public long getId() {
|
252
|
-
|
253
|
-
return id;
|
254
|
-
|
255
|
-
}
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
public void setId(long id) {
|
260
|
-
|
261
|
-
this.id= id;
|
262
|
-
|
263
|
-
}
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
public String getUserName() {
|
268
|
-
|
269
|
-
return userName;
|
270
|
-
|
271
|
-
}
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
public void SetUserName(String userName)
|
276
|
-
|
277
|
-
{
|
278
|
-
|
279
|
-
this.userName = userName;
|
280
|
-
|
281
|
-
}
|
282
|
-
|
283
|
-
public String getPassword() {
|
284
|
-
|
285
|
-
return password;
|
286
|
-
|
287
|
-
}
|
288
|
-
|
289
|
-
public void setPassword(String password) {
|
290
|
-
|
291
|
-
this.password = password;
|
292
|
-
|
293
|
-
}
|
294
|
-
|
295
|
-
public String getFullName() {
|
296
|
-
|
297
|
-
return fullName;
|
298
|
-
|
299
|
-
}
|
300
|
-
|
301
|
-
public void setFullName(String fullName) {
|
302
|
-
|
303
|
-
this.fullName = fullName;
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
}
|
308
|
-
|
309
|
-
}
|
310
|
-
|
311
|
-
|
312
318
|
|
313
319
|
```
|
314
320
|
|
315
321
|
|
316
322
|
|
317
|
-
```
|
323
|
+
```index.html
|
318
324
|
|
319
325
|
<!DOCTYPE html>
|
320
326
|
|
@@ -362,6 +368,12 @@
|
|
362
368
|
|
363
369
|
|
364
370
|
|
371
|
+
コード
|
372
|
+
|
373
|
+
```
|
374
|
+
|
375
|
+
|
376
|
+
|
365
377
|
### login.html
|
366
378
|
|
367
379
|
<!DOCTYPE html>
|
@@ -388,7 +400,7 @@
|
|
388
400
|
|
389
401
|
</html>
|
390
402
|
|
391
|
-
|
403
|
+
コード
|
392
404
|
|
393
405
|
```
|
394
406
|
|
4
コードの載せ方を修正しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,7 +32,7 @@
|
|
32
32
|
|
33
33
|
|
34
34
|
|
35
|
-
|
35
|
+
}``` LoginController.java
|
36
36
|
|
37
37
|
|
38
38
|
|
@@ -152,7 +152,11 @@
|
|
152
152
|
|
153
153
|
}
|
154
154
|
|
155
|
+
|
156
|
+
|
155
|
-
|
157
|
+
コード
|
158
|
+
|
159
|
+
```
|
156
160
|
|
157
161
|
|
158
162
|
|
@@ -188,7 +192,7 @@
|
|
188
192
|
|
189
193
|
|
190
194
|
|
191
|
-
|
195
|
+
```User.java
|
192
196
|
|
193
197
|
package com.example.easylogin.model.entity;
|
194
198
|
|
@@ -306,7 +310,11 @@
|
|
306
310
|
|
307
311
|
|
308
312
|
|
313
|
+
```
|
314
|
+
|
315
|
+
|
316
|
+
|
309
|
-
|
317
|
+
``` index.html
|
310
318
|
|
311
319
|
<!DOCTYPE html>
|
312
320
|
|
@@ -382,6 +390,8 @@
|
|
382
390
|
|
383
391
|
|
384
392
|
|
393
|
+
```
|
394
|
+
|
385
395
|
|
386
396
|
|
387
397
|
### 試したこと
|
3
ブラウザ画面の画像を追加しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
![500エラーの画面](e796f27160b756e9a9321152907e657f.png)Spring tool suiteでWhitelabel Error Pageと表示される。
|
1
|
+
![ブラウザの画面](22cd561d4ee441ff57756ebe21dc363d.png)![500エラーの画面](e796f27160b756e9a9321152907e657f.png)Spring tool suiteでWhitelabel Error Pageと表示される。
|
2
2
|
|
3
3
|
![STSのコンソール](521c7e7a100e92ef77fe3a17a0a3827c.png)
|
4
4
|
|
2
画像を添付しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
Spring tool suiteでWhitelabel Error Pageと表示される。
|
1
|
+
![500エラーの画面](e796f27160b756e9a9321152907e657f.png)Spring tool suiteでWhitelabel Error Pageと表示される。
|
2
|
+
|
2
|
-
|
3
|
+
![STSのコンソール](521c7e7a100e92ef77fe3a17a0a3827c.png)
|
3
|
-
|
4
4
|
|
5
5
|
プログラミング初心者です。
|
6
6
|
|
1
今回使用したすべてのコード(4種類)を記載いたしました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,9 +32,7 @@
|
|
32
32
|
|
33
33
|
|
34
34
|
|
35
|
-
### 該当のソースコード
|
36
|
-
|
37
|
-
|
35
|
+
### LoginController.java
|
38
36
|
|
39
37
|
|
40
38
|
|
@@ -158,7 +156,7 @@
|
|
158
156
|
|
159
157
|
|
160
158
|
|
161
|
-
|
159
|
+
### UserRepository.java
|
162
160
|
|
163
161
|
package com.example.easylogin.model.dao;
|
164
162
|
|
@@ -190,6 +188,198 @@
|
|
190
188
|
|
191
189
|
|
192
190
|
|
191
|
+
### User.java
|
192
|
+
|
193
|
+
package com.example.easylogin.model.entity;
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
import javax.persistence.Column;
|
198
|
+
|
199
|
+
import javax.persistence.Entity;
|
200
|
+
|
201
|
+
import javax.persistence.GeneratedValue;
|
202
|
+
|
203
|
+
import javax.persistence.GenerationType;
|
204
|
+
|
205
|
+
import javax.persistence.Id;
|
206
|
+
|
207
|
+
import javax.persistence.Table;
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
@Entity
|
212
|
+
|
213
|
+
@Table(name="user")
|
214
|
+
|
215
|
+
public class User {
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
@Id
|
220
|
+
|
221
|
+
@Column(name = "id")
|
222
|
+
|
223
|
+
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
224
|
+
|
225
|
+
private long id;
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
@Column(name = "user_name")
|
230
|
+
|
231
|
+
private String userName;
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
@Column(name = "password")
|
236
|
+
|
237
|
+
private String password;
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
@Column(name = "full_name")
|
242
|
+
|
243
|
+
private String fullName;
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
public long getId() {
|
248
|
+
|
249
|
+
return id;
|
250
|
+
|
251
|
+
}
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
public void setId(long id) {
|
256
|
+
|
257
|
+
this.id= id;
|
258
|
+
|
259
|
+
}
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
public String getUserName() {
|
264
|
+
|
265
|
+
return userName;
|
266
|
+
|
267
|
+
}
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
public void SetUserName(String userName)
|
272
|
+
|
273
|
+
{
|
274
|
+
|
275
|
+
this.userName = userName;
|
276
|
+
|
277
|
+
}
|
278
|
+
|
279
|
+
public String getPassword() {
|
280
|
+
|
281
|
+
return password;
|
282
|
+
|
283
|
+
}
|
284
|
+
|
285
|
+
public void setPassword(String password) {
|
286
|
+
|
287
|
+
this.password = password;
|
288
|
+
|
289
|
+
}
|
290
|
+
|
291
|
+
public String getFullName() {
|
292
|
+
|
293
|
+
return fullName;
|
294
|
+
|
295
|
+
}
|
296
|
+
|
297
|
+
public void setFullName(String fullName) {
|
298
|
+
|
299
|
+
this.fullName = fullName;
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
}
|
304
|
+
|
305
|
+
}
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
### index.html
|
310
|
+
|
311
|
+
<!DOCTYPE html>
|
312
|
+
|
313
|
+
<html xmlns:th="http://www.thymeleaf.org">
|
314
|
+
|
315
|
+
<head>
|
316
|
+
|
317
|
+
<meta charset="UTF-8"/>
|
318
|
+
|
319
|
+
<title>Insert title here</title>
|
320
|
+
|
321
|
+
</head>
|
322
|
+
|
323
|
+
<body>
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
<form name="LoginForm" action="/Login">
|
328
|
+
|
329
|
+
<div>
|
330
|
+
|
331
|
+
<span>User name</span>
|
332
|
+
|
333
|
+
<input type="text" name="userName" />
|
334
|
+
|
335
|
+
</div>
|
336
|
+
|
337
|
+
<div>
|
338
|
+
|
339
|
+
<span>Password</span>
|
340
|
+
|
341
|
+
<input type="password" name="password" />
|
342
|
+
|
343
|
+
</div>
|
344
|
+
|
345
|
+
<button type="submit">Login</button>
|
346
|
+
|
347
|
+
</form>
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
</body>
|
352
|
+
|
353
|
+
</html>
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
### login.html
|
358
|
+
|
359
|
+
<!DOCTYPE html>
|
360
|
+
|
361
|
+
<html xmlns:th="http://www.thymeleaf.org">
|
362
|
+
|
363
|
+
<head>
|
364
|
+
|
365
|
+
<meta charset="UTF-8"/>
|
366
|
+
|
367
|
+
<title>Insert title here</title>
|
368
|
+
|
369
|
+
</head>
|
370
|
+
|
371
|
+
<body>
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
<p th:text="$"{message}"/>
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
</body>
|
380
|
+
|
381
|
+
</html>
|
382
|
+
|
193
383
|
|
194
384
|
|
195
385
|
|