GithubHelp home page GithubHelp logo

hanchungang / login Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jacks5320/login

0.0 0.0 0.0 44 KB

这里是一些简单的登录注册demo,具体实现方式查看README。

Java 79.33% HTML 20.67%

login's Introduction

基于SpringBoot的登录注册案例

这里用SpringBoot实现了一个简单的登录注册案例,所使用的的环境如下:

  • Java_8
  • IDEA_2019.2.3
  • MySQL_8.0.17
  • 其他的一些依赖版本查看POM树

这里用到的SQL语句如下

-- 创建数据库
CREATE DATABASE IF NOT EXISTS iotat character set utf8;
USE iotat;
-- 用户等级表
CREATE TABLE user_grade(
    gradeId INT(5) NOT NULL,
    gradeName VARCHAR(20) NOT NULL,
    PRIMARY KEY (gradeId)
) ENGINE=INNODB DEFAULT CHARSET=utf8;

-- 插入用户等级数据
INSERT INTO user_grade VALUES
(1,"超级管理员"),
(2,"普通用户"),
(3,"游客");

-- 创建用户表

CREATE TABLE user(
    userId INT(5) NOT NULL AUTO_INCREMENT,
    userName VARCHAR(32) NOT NULL UNIQUE,
    userPassword VARCHAR(32) NOT NULL,
    userEmail VARCHAR(32),
    userGrade INT(5) NOT NULL,
    CONSTRAINT user_grade_id FOREIGN KEY (userGrade) REFERENCES user_grade(gradeId),
    PRIMARY KEY (userId)
) ENGINE=INNODB DEFAULT CHARSET=utf8;

-- 插入超级管理员、实验室管理员和普通用户
INSERT INTO user VALUES
(1,"admin","111","[email protected]",1),
(2,"iotat","222","[email protected]",2),
(3,"normal","333","[email protected]",3);

注意事项

  • 使用时多关注application.properties相关配置。
  • 使用关注userMapper.xml的配置。

login's People

Contributors

jacks5320 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.