LoginSignup
2
3

More than 3 years have passed since last update.

Spring4でWhitelabel Error Pageが出た時の対処法

Last updated at Posted at 2019-05-31

404 This application has no explicit mapping for /error

解決法:build.gradle にthymeleafのランタイムを導入する一文を入れる。

build.gradle
compile('org.springframework.boot:spring-boot-starter-thymeleaf')

500 com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'name' at row 1

Sat Jul 13 00:25:39 JST 2019
There was an unexpected error (type=Internal Server Error, status=500).
could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.DataException: could not execute statement
原因: 
HTMLのフォームのinputタグのname属性に同じものがあったため、正しくはhogeとなるところhogehogeとかになっていた。
既存のinputタグをdiv単位でコピペする時に修正もれした結果。
解決法:Springが吐き出す大量のエラー羅列の一番上の方にどのカラムがおかしいか書いてあるので検索したり最近コピーした辺りのname属性をよく見る。2箇所だけでなく複数箇所コピー元のままになっている事が多いので治るまで探す。

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3