Giter Site home page Giter Site logo

user-center-backend's Introduction

用户中心(后端)

用户表设计

字段 数据类型 说明
id big int 主键、自增、非空
userName varchar 用户昵称,代码层面设置默认值,可不填
userAccount varchar 登录账号,非空,最大为8位
userPassword varchar 密码,非空,以加密的方式存入数据库,用户填写的密码不得少于8位
userAvatar varchar 用户头像图片地址,代码层面给默认值
gender tiny int 性别:1 - 男,0 - 女
phone varchar 手机号,允许为空
email varchar 邮箱。允许为空
userRole tiny int 用户角色,0-普通用户,1-管理员,2-被封号的用户
createTime datetime 创建时间,默认为当前时间
updateTime datetime 更新时间,变化时修改为当前时间
isDelete tiny int 是否删除, 0 - 未删除,1 - 删除

如何上线?

  1. 打包项目

    mvn clean package
  2. 将Dockerfile和docker-compose.yml以及打包后的jar包一起上传至服务器上的同级目录

  3. 构建镜像

    docker build -t user-center-backend:0.0.1 . 
  4. 创建my.cnf,位置:/app/mysql/conf/my.cnf,可以根据的自己的需求更改,同时需要更改docker-compose.yml内部的内容

    [client]
    default_character_set=utf8
    [mysqld]
    collation_server = utf8_general_ci
    character_set_server = utf8
  5. 启动镜像

    docker-compose up -d
  6. 进入mysql容器

    docker exec -it contaner-id(mysql) /bin/bash

    创建数据库和表(建表语句在sql/create_table.sql内,模拟数据在sql/user.sql内,密码字段都是加密后的,加密前都是12345678)

  7. 启动前端访问即可

user-center-backend's People

Contributors

chengquanxu avatar

Watchers

 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.