GithubHelp home page GithubHelp logo

always0ne / springbootrestapitemplate Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 2.0 1.36 MB

SpringBootRestApiTemplate

Home Page: https://always0ne.github.io/SpringBootRestApiTemplate/

License: MIT License

Java 99.87% Dockerfile 0.13%
spring-boot template jwt

springbootrestapitemplate's Introduction

SpringBootRestApiTemplate

Index

About SpringBootRestApiTemplate

This Project is for Quick Start Spring boot Restful Api Server
This project provides a simple community functions.

Overview

Provide Features

  • Community Api - See Rest Api Docs
  • Error Report System(to SLACK)
  • JWT Authentication(use AccessToken and RefreshToken)
  • Pull Request Auto BuildTest
  • Build Docker image when merged develop(test) and master(release) branch
  • Class Document

ErrorCode Rules

account 	0000
community	1000
post		1100
comment		1200
system		2000

Getting Started

Dependencies

  • JDK11
  • All dependencies are managed by gradle

Deployment

this project build docker image automatically so deploy on docker

login github docker registry

sudo docker login https://docker.pkg.github.com --username [userName]

Deploy on server

  • deploy test server(develop branch)
sudo docker run -d  -p 8080:8080 --name=testserver \
-v /etc/localtime:/etc/localtime:ro  -e TZ=Asia/Seoul  --restart=unless-stopped \
docker.pkg.github.com/always0ne/springbootrestapitemplate/test:version
  • deploy running server(master branch)
sudo docker run -d  -p 8080:8080 --name=server \
-v /etc/localtime:/etc/localtime:ro  -e TZ=Asia/Seoul  --restart=unless-stopped \
docker.pkg.github.com/always0ne/springbootrestapitemplate/release:version

Contributing

If you see this project and have any points to improve or do not understand, please post any issues or Pull Requests. Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

See also the list of contributors who participated in this project.

Used or Referenced Projects

License

MIT License

Copyright (c) 2020 always0ne

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

springbootrestapitemplate's People

Contributors

always0ne avatar fossabot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

bjih1999 fossabot

springbootrestapitemplate's Issues

[리펙토링]Comments 조회분리

제안할 부분

댓글 기능을 API로 분리하기

바뀌어야 하는 이유

댓글 수가 많아졌을 때 다 받아오면 overhead가 큼

바꾸는 방법

댓글 조회 페이징되도록 API 생성

[기능제안]서버 장애 발생시 슬랙에 알림을 주는 기능

어느것에 관한것인가

서버를 운영할떄, 혹은 클라이언트와 연동하는 과정, 기능 테스트할 때 종종 예상치 못한 예외가 발생하는 경우가 있다. 이럴때 신속하게 슬랙 채널로 보고가 되어야 빠른 장애 대응이 가능하기 때문에 필요하다.

원하는 해결방법

프로젝트의 Exception은 현재 @ControllerAdvice로 관리가 되고있다.
우선순위가 가장 낮은 @ControllerAdvice를 생성해 개발시 식별하지 못했던 예외 발생시 즉시 디버깅정보를 포함하여 지정한 Slack 채널에 알림이 가도록 한다.

해결방법에 대한 설명

MultiReadableHttpServletRequest를 활용하여 요청정보를 수집한 후, 장애 발생시 해당정보를 포함하여 Slack에 알림을 보낸다.

[리펙토링]데이터베이스 예약어 고려 변경

제안할 부분

데이터 베이스 예약어를 피해서 엔티티 멤버를 변경

바뀌어야 하는 이유

템플릿이기 때문에 여러 데이터베이스 호환성을 고려하여야 한다.

바꾸는 방법

데이터베이스별로 있는 예약어 리스트를 참고하여 예약어를 피하는 변수명을 지정한다.

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.