Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot 类型为'的bean;org.thymeleaf.TemplateEngine';那是找不到的 介绍_Spring Boot_Thymeleaf_Autowired - Fatal编程技术网

Spring boot 类型为'的bean;org.thymeleaf.TemplateEngine';那是找不到的 介绍

Spring boot 类型为'的bean;org.thymeleaf.TemplateEngine';那是找不到的 介绍,spring-boot,thymeleaf,autowired,Spring Boot,Thymeleaf,Autowired,我在POM中使用了以下内容: <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.5.9.RELEASE</version> </parent> 添加了以下依赖项: 我添加了以下内容和我的应用程序版

我在POM中使用了以下内容:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.9.RELEASE</version>
</parent>
添加了以下依赖项: 我添加了以下内容和我的应用程序版本:

<dependency>
            <groupId>org.thymeleaf</groupId>
            <artifactId>thymeleaf</artifactId>
            <version>2.1.6.RELEASE</version>
        </dependency>
<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.1.RELEASE</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>
<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>
 Error:(34, 21) java: cannot find symbol
      symbol:   class TemplateProcessingParameters
      location: package org.thymeleaf
    Error:(37, 38) java: package org.thymeleaf.resourceresolver does not exist
    Error:(49, 38) java: cannot find symbol
      symbol:   class TemplateResolver
      location: package org.thymeleaf.templateresolver
    Error:(179, 65) java: cannot find symbol
      symbol:   class IResourceResolver
      location: class eu.europa.ec.themis.sgtemplateservice.MbakTemplateServiceApplication
    Error:(187, 56) java: cannot find symbol
      symbol:   class TemplateProcessingParameters
      location: class org.mbak.MbakTemplateServiceApplication.InMemoryResourceResolver
    Error:(168, 62) java: cannot find symbol
      symbol:   class TemplateResolver
      location: class org.mbak.MbakTemplateServiceApplication
<dependency>
            <groupId>org.thymeleaf</groupId>
            <artifactId>thymeleaf</artifactId>
            <version>2.1.6.RELEASE</version>
        </dependency>
***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 0 of constructor in org.mbak.MbakServiceApplication$ThymeleafTemplateEngine required a bean of type 'org.thymeleaf.TemplateEngine' that could not be found.


Action:

Consider defining a bean of type 'org.thymeleaf.TemplateEngine' in your configuration.