質問編集履歴
3
誤字を直しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -139,7 +139,7 @@
|
|
139
139
|
```
|
140
140
|
あと、念の為、ソースコードを[GitHub](https://github.com/Megafriday/demo)にアップロードしました。
|
141
141
|
|
142
|
-
バージョンについては、自
|
142
|
+
バージョンについては、自信が無いですが以下です。
|
143
143
|
Java: 1.8
|
144
144
|
Spring Boot:2.1.2.RELEASE
|
145
145
|
Thymeleaf:3.0.11.RELEASE
|
2
バージョンについても分かる範囲で記載しました。念の為、IDEの画像も添付しておきます。
title
CHANGED
File without changes
|
body
CHANGED
@@ -138,4 +138,12 @@
|
|
138
138
|
</project>
|
139
139
|
```
|
140
140
|
あと、念の為、ソースコードを[GitHub](https://github.com/Megafriday/demo)にアップロードしました。
|
141
|
+
|
142
|
+
バージョンについては、自身が無いですが以下です。
|
143
|
+
Java: 1.8
|
144
|
+
Spring Boot:2.1.2.RELEASE
|
145
|
+
Thymeleaf:3.0.11.RELEASE
|
146
|
+

|
147
|
+
|
148
|
+
|
141
149
|
どこが間違っているか、教えて頂けたら嬉しいです。
|
1
情報の追加の依頼を頂きました。pom.xmlの内容を追加致しました。あと念ため、GitHubにファイルもアップロードしました。どうぞ宜しくお願いいたします。
title
CHANGED
File without changes
|
body
CHANGED
@@ -73,4 +73,69 @@
|
|
73
73
|
```
|
74
74
|
「http://localhost:8080/confirm」にアクセスし、テキストボックスに1文字を入力して実行すると、コンソールに「ConfirmController.doPost().haserrors」が出力され、バリデーションエラーがあることがわかり、入力画面に戻ります。
|
75
75
|
ところが、常に「#fields.hasErrors('name')」がfalseであるため、エラーメッセージが出力されません。
|
76
|
-
どこに誤りがあるのか教えてください。
|
76
|
+
どこに誤りがあるのか教えてください。
|
77
|
+
|
78
|
+
**追記です。**
|
79
|
+
pom.xmlです。
|
80
|
+
```XML
|
81
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
82
|
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
83
|
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
84
|
+
<modelVersion>4.0.0</modelVersion>
|
85
|
+
<parent>
|
86
|
+
<groupId>org.springframework.boot</groupId>
|
87
|
+
<artifactId>spring-boot-starter-parent</artifactId>
|
88
|
+
<version>2.1.2.RELEASE</version>
|
89
|
+
<relativePath/> <!-- lookup parent from repository -->
|
90
|
+
</parent>
|
91
|
+
<groupId>com.example</groupId>
|
92
|
+
<artifactId>demo</artifactId>
|
93
|
+
<version>0.0.1-SNAPSHOT</version>
|
94
|
+
<packaging>war</packaging>
|
95
|
+
<name>demo</name>
|
96
|
+
<description>Demo project for Spring Boot</description>
|
97
|
+
|
98
|
+
<properties>
|
99
|
+
<java.version>1.8</java.version>
|
100
|
+
</properties>
|
101
|
+
|
102
|
+
<dependencies>
|
103
|
+
<dependency>
|
104
|
+
<groupId>org.springframework.boot</groupId>
|
105
|
+
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
106
|
+
</dependency>
|
107
|
+
<dependency>
|
108
|
+
<groupId>org.springframework.boot</groupId>
|
109
|
+
<artifactId>spring-boot-starter-web</artifactId>
|
110
|
+
</dependency>
|
111
|
+
|
112
|
+
<dependency>
|
113
|
+
<groupId>org.projectlombok</groupId>
|
114
|
+
<artifactId>lombok</artifactId>
|
115
|
+
<optional>true</optional>
|
116
|
+
</dependency>
|
117
|
+
<dependency>
|
118
|
+
<groupId>org.springframework.boot</groupId>
|
119
|
+
<artifactId>spring-boot-starter-tomcat</artifactId>
|
120
|
+
<scope>provided</scope>
|
121
|
+
</dependency>
|
122
|
+
<dependency>
|
123
|
+
<groupId>org.springframework.boot</groupId>
|
124
|
+
<artifactId>spring-boot-starter-test</artifactId>
|
125
|
+
<scope>test</scope>
|
126
|
+
</dependency>
|
127
|
+
</dependencies>
|
128
|
+
|
129
|
+
<build>
|
130
|
+
<plugins>
|
131
|
+
<plugin>
|
132
|
+
<groupId>org.springframework.boot</groupId>
|
133
|
+
<artifactId>spring-boot-maven-plugin</artifactId>
|
134
|
+
</plugin>
|
135
|
+
</plugins>
|
136
|
+
</build>
|
137
|
+
|
138
|
+
</project>
|
139
|
+
```
|
140
|
+
あと、念の為、ソースコードを[GitHub](https://github.com/Megafriday/demo)にアップロードしました。
|
141
|
+
どこが間違っているか、教えて頂けたら嬉しいです。
|