thymeleaf 에서 LocalDateTime 관련 처리를 하려면

2021. 4. 1. 17:44전자정부 업글/Thymeleaf 적용기

반응형

	<bean id="templateEngine" class="org.thymeleaf.spring5.SpringTemplateEngine">
		<property name="templateResolver" ref="templateResolver" />
		<property name="enableSpringELCompiler" value="true" />
		<property name="additionalDialects">
			<set>			
				<bean class="nz.net.ultraq.thymeleaf.LayoutDialect"></bean>
				<bean class="org.thymeleaf.dialect.springdata.SpringDataDialect"></bean>
				<bean class="org.thymeleaf.extras.java8time.dialect.Java8TimeDialect"></bean>
			</set>
		</property>
	</bean>
  • pom.xml에 java8time thymeleaf dependency 추가한다.
<dependency>
 <groupId>org.thymeleaf.extras</groupId>
 <artifactId>thymeleaf-extras-java8time</artifactId>
 <version>3.0.4.RELEASE</version>
</dependency>

 

굿끝!

 

반응형