zoukankan      html  css  js  c++  java
  • springboot2.3.x whitelabel error page 404

    一般资料都提3个问题

      1. controller 位置不对

      2. 未添加依赖

    <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-thymeleaf</artifactId>
            </dependency>

      3. 注释<scope>provided</scope>

      <!--<dependency>-->
                <!--<groupId>org.apache.tomcat.embed</groupId>-->
                <!--<artifactId>tomcat-embed-jasper</artifactId>-->
                <!--<scope>provided</scope>-->
            <!--</dependency>-->

    我的问题是 properties 要用 thymeleaf-spring5.version

      <properties>
            <java.version>1.8</java.version>
            <!--自定配置开始-->
            <thymeleaf-spring5.version>3.0.9.RELEASE</thymeleaf-spring5.version>
            <thymeleaf-layout-dialect.version>2.3.0</thymeleaf-layout-dialect.version>
            <!--<thymeleaf.version>3.0.2.RELEASE</thymeleaf.version>-->
            <!--<thymeleaf-layout-dialect.version>2.1.1</thymeleaf-layout-dialect.version>-->
            <!--自定配置结束-->
        </properties>
  • 相关阅读:
    HTTP报文详解
    常用的HTTP协议
    URL详解
    一起切磋
    emacs使用指南
    SSH自动部署
    linux上应用随机启动
    让Maven正确处理javac警告
    最近的学习
    Java application 性能分析分享
  • 原文地址:https://www.cnblogs.com/xdot/p/13792416.html
Copyright © 2011-2022 走看看