如何从资源目录中提取“模板”和“静态”文件夹

时间:2019-08-23 11:21:10

标签: spring-boot thymeleaf

我正在使用弹簧靴和百里香叶。我想从资源目录中提取模板和静态文件夹。

当应用程序将在服务器中部署时,我想分别部署jar文件和模板。

我去尝试将此配置写入应用程序属性文件中。

spring.thymeleaf.prefix =类路径:/ home / project / my_project / resources / templates spring.resources.staticLocations = / home / project / my_project / resources

但是我遇到了这个错误

由以下原因引起:org.springframework.beans.factory.UnsatisfiedDependencyException:创建名称为“ org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration $ ThymeleafDefaultConfiguration”的bean时出错:通过构造函数参数0表示的不满意依赖关系;嵌套异常是org.springframework.beans.factory.BeanCreationException:创建名称为“ org.springframework.boot.auto.config.thymeleaf.ThymeleafAutoConfiguration $ Thymeleaf2Configuration $ DefaultTemplateResolverConfiguration”的bean时出错:初始化init方法失败;嵌套的异常是java.lang.IllegalArgumentException:名称         在org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749)处         在org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189)

0 个答案:

没有答案
相关问题