SpringBoot整合Mybatis+HTML完成一个简单的登录注册界面(附效果图和源码)

本文展示了如何使用SpringBoot和Mybatis构建一个包含登录、注册功能的简单应用。详细介绍了前端HTML界面、数据库设计、后端代码实现,包括创建数据库、配置pom.xml、实体类、Mapper、Service和Controller的编写。提供了源码下载链接和开发思路总结。
摘要由CSDN通过智能技术生成

一、效果演示

1.1、登录演示

登录演示

1.2、注册演示

注册演示

1.3、项目结构

目录结构

二、代码实现

2.1、前端代码

简介:这里我是根据之前做的一个登录界面稍微修改了一下实现功能的,其中js没有修改,这里就不放在这里占内存了。有需要的可以点击该链接复制js来使用: js下载的地址

2.2、源码地址

源码地址:https://gitee.com/jingtian99/spring-boot_-login

登录注册界面

<!DOCTYPE html >
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>登录注册界面</title>
    <link rel="stylesheet" href="../static/style.css">
</head>

<body>
<!-- 整体布局 -->
<div class="container right-panel-active">

    <!-- 注册框 -->
    <div class="container_from container_signup">
        <form class="from" method="post" id="from1" th:action="@{/register}">
            <h2 class="form_title">注册账号</h2>
            <span th:text="${tip}"></span>
            <input type="email" name="Email" placeholder="请输入邮箱" class="input">
            <input type="text" name="username" placeholder="请输入账号" class="input">
            <input type="password" name="password" placeholder="请输入密码" class="input">
            <input type="password" name="password1" placeholder="再次确认密码" class="input">
            <input class="btn" type="submit" value="点击注册"/>
        </form>
    </div>

    <!-- 登录框 -->
    <div class="container_from container_signin">
        <form class="from" id="from2" action="success.html" method="post" th:action="@{/login2}">
            <h2 class="form_title">欢迎登录</h2>
            <span th:text="${msg}"></span>
            <input type="text" name="username" placeholder="请输入您的账号" class="input">
            <input type="password" name="password" placeholder="请输入您的密码" class="input">
            <div>
                <span>记住密码</span><input type="checkbox" name="rup" id="rup"/>
                <span>自动登录
  • 10
    点赞
  • 120
    收藏
    觉得还不错? 一键收藏
  • 7
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值