springboot运行成功但页面空白

噗运特 噗运特 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

 

求解答!!!!感谢!!!

 

数据库连接成功,但不知道为什么表内容重复了。。

页面全空白。。

 

 

 

 

 

 

 

 

 

 

 

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
<parent>
    <artifactId>spring-boot-starter-parent</artifactId>
    <groupId>org.springframework.boot</groupId>
    <version>3.1.6</version>
</parent>
    <groupId>org.example</groupId>
    <artifactId>spb1</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
    </properties>
<dependencies>
<!--    mybatis起步依赖-->
    <dependency>
        <groupId>org.mybatis.spring.boot</groupId>
        <artifactId>mybatis-spring-boot-starter</artifactId>
        <version>3.0.3</version>
    </dependency>
<!--    mysql驱动依赖-->
    <dependency>
        <groupId>com.mysql</groupId>
        <artifactId>mysql-connector-j</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>

    </dependency>
    <dependency>
        <groupId>org.eclipse.angus</groupId>
        <artifactId>jakarta.mail</artifactId>
    </dependency>
    <!--thymeleaf-->

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

</dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>
...全文

相关推荐

通过SpringBoot访问HTML页面源码

通过SpringBoot访问HTML页面实例,代码简洁,易懂,有注释

吃瓜~

Springboot访问templates html页面过程详解

主要介绍了Springboot访问templates html页面过程详解,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下

weixin_38547421

Vue项目部署在Spring Boot出现页面空白问题的解决方案

网上流行的解决方案是将assetsPublicPath: ‘/’改成’./’,下面说一下这个解决方案的弊端: 通常页面空白的问题出现大多数是由于Spring Boot端配置了server.servlet.context-path,上下文改变了css, js等文件的访问路径,文件无法加载导致index.html显示空白。’/’改成’./’是将绝对路径变为相对路径,可以动态适应Spring Boot端上下文的改变,这是为什么这个解决方案起作用的原因。 Vue项目部署在Spring Boot出现的另一个常见问题是当刷新浏览器的时候出现white label, 也就是404错误,解决的方案基本是把er

weixin_38507208

解决SpringBoot启动过后不能访问jsp页面的问题(超详细)

主要介绍了解决SpringBoot启动过后不能访问jsp页面的问题,文中通过示例代码介绍的非常详细,有需要的朋友可以参考一下,希望对你有所帮助。

weixin_38684328

如何运行SpringBoot项目的方法

主要介绍了如何运行SpringBoot项目的方法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧

weixin_38663029
评论
收藏 已收藏
分享
返回顶部
噗运特
Web 开发 81,108 成员 341,721 内容