Coder Social home page Coder Social logo

spring-boot-blog's Introduction

Spring Boot step by step

  1. 使用 idea 新建 Spring Boot 项目
  2. 使用 Spring Maven 仓库加速 Maven jar 包下载
  3. 实现用户注册接口
  4. 实现用户登录接口
  5. 配置 logback 和全局异常处理
  6. 使用 spring 拦截器和自定义注解进行登录拦截
  7. 通过自定义 @CurrentUser 获取当前登录用户
  8. 实现文章添加和查询接口
  9. 使用 fastjson 解析数据

部署说明


docker

默认 18080 端口

  1. 安装 docker

  2. 安装 docker-compose

  3. 修改 mysql 用户名和密码

    $ cp application.yml.sample application.yml
    $ vi application.yml
    
    $ cp mysql.env mysql.env.local
    $ vi mysql.env.local
    
  4. package

    $ docker-compose up maven
    
  5. run

    • 直接运行
      $ docker-compose up app
      
    • 后台运行
      $ docker-compose start app
      

非docker

默认 8080 端口

  1. package
    $ mvn clean package 
    
  2. run
    $ nohub java -jar target/spring-boot-blog-0.0.1-SNAPSHOT.jar &
    

spring-boot-blog's People

Contributors

hyrijk avatar

Watchers

 avatar  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.