LoginSignup
9
7

More than 5 years have passed since last update.

SpringBoot +thymeleaf + nekoHTML問題

Last updated at Posted at 2015-08-23

thymeleaf
http://www.thymeleaf.org/

デフォルトで入ってるthymeleafのテンプレートエンジンの構文チェックが厳しすぎる件で、調整する方法がないか模索中。
デフォルトでXMLパーサーを使うので構文チェックが厳しすぎるのだ。
DOMパーサーとして、NekoHTMLを入れてLEGACYHTML5を指定することでいい加減なHTMLが読めるようになるのだが、いかんせん、xml-apis.jarのバージョンが古く、最新の2.0系には対応していないようなエラーがでる。
この問題はgradleを使わずにNekoHTMLのサイトからダウンロードしてきたファイルをライブラリ参照する事で一旦解消しているので調査保留中。

spring.thymeleaf.mode=LEGACYHTML5

build.gradle
compile("org.springframework.boot:spring-boot-starter-thymeleaf")
compile('net.sourceforge.nekohtml:nekohtml:1.9.22')

nekoHTML
http://nekohtml.sourceforge.net/

9
7
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
9
7