freemarker页面启动无法访问
2018-12-09 15:01:40.575 WARN 9784 --- [ restartedMain] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'viewResolver' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration$FreeMarkerWebConfiguration': Unsatisfied dependency expressed through field 'properties': Error creating bean with name 'spring.freemarker-org.springframework.boot.autoconfigure.freemarker.FreeMarkerProperties': Could not bind properties to FreeMarkerProperties (prefix=spring.freemarker, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is org.springframework.validation.BindException: org.springframework.boot.bind.RelaxedDataBinder$RelaxedBeanPropertyBindingResult: 1 errors
Field error in object 'spring.freemarker' on field 'charset': rejected value [UTF-8 ]; codes [typeMismatch.spring.freemarker.charset,typeMismatch.charset,typeMismatch.java.nio.charset.Charset,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [spring.freemarker.charset,charset]; arguments []; default message [charset]]; default message [Failed to convert property value of type [java.lang.String] to required type [java.nio.charset.Charset] for property 'charset'; nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [java.nio.charset.Charset]]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spring.freemarker-org.springframework.boot.autoconfigure.freemarker.FreeMarkerProperties': Could not bind properties to FreeMarkerProperties (prefix=spring.freemarker, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is org.springframework.validation.BindException: org.springframework.boot.bind.RelaxedDataBinder$RelaxedBeanPropertyBindingResult: 1 errors
Field error in object 'spring.freemarker' on field 'charset': rejected value [UTF-8 ]; codes [typeMismatch.spring.freemarker.charset,typeMismatch.charset,typeMismatch.java.nio.charset.Charset,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [spring.freemarker.charset,charset]; arguments []; default message [charset]]; default message [Failed to convert property value of type [java.lang.String] to required type [java.nio.charset.Charset] for property 'charset'; nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [java.nio.charset.Charset]]
2018-12-09 15:01:40.585 INFO 9784 --- [ restartedMain] o.apache.catalina.core.StandardService : Stopping service Tomcat
2018-12-09 15:01:40.608 INFO 9784 --- [ restartedMain] utoConfigurationReportLoggingInitializer :
Error starting ApplicationContext. To display the auto-configuration report enable debug logging (start with --debug)
2018-12-09 15:01:40.625 ERROR 9784 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************