ageldama / closed-book-room

닫힌서재!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

closed-book-room

Requirements

  1. Java 1.8+
  2. Maven 3+
  3. Modern Web browser : because web interfaces are implemented with HTML5 / Vue.js

Run tests

  1. mvn test
  2. To check test coverage: open ./target/jacoco-ut/index.html in web browser.

Run standalone

  1. mvn spring-boot:run
  2. Open http://localhost:8080 in your web browser.
    1. Default User: ID=test Password=test.

API definitions

  1. (Run mvn spring-boot:run)
  2. Open http://localhost:8080/swagger-ui.html to check Swagger-UI.

Admin endpoints

  1. Can create new user, change password of user and activate/deactive user account,
    1. See admin-controller-section of Swagger definition.
    2. Default Admin: ID=admin Password=admin
    3. If you really needs to add new admin account, please add an entry in ./src/main/resources/db/migration/hsqldb/V1.001__create_users.sql like one for admin. (Currently adding admin account through API-endpoint is not supported)

Add an user

  1. curl -v -XPOST http://admin:admin@localhost:8080/v1/admin/new-user/foobar : creates new deactivated user account with random-generated-password.
  2. curl -v -XPATCH http://admin:admin@localhost:8080/v1/admin/activate-user/foobar\?activeness\=true : activate account.
  3. curl -v -XPOST http://admin:admin@localhost:8080/v1/admin/user-password/foobar -dfoobar -H"Content-Type: text/plain" : set password

사용한 오픈소스 라이브러리

  1. Spring Boot
  2. Flyway : Hibernate DDL 자동생성 대신에 직접 스키마 생성하고 마이그레이션 가능하도록 적용.
  3. Spring Security : 로그인 기능을 위해 사용
  4. Guava, Commons-io, Commons-lang3 : Java 기본 라이브러리로 사용
  5. SpringFox Swagger2 : Swagger2
  6. Javafaker : 간단히 랜덤 아이디, 이메일 등 생성하기 위해 사용
  7. JaCoCo : Test Code Coverage Report 생성위해 Maven 플러그인으로 사용
  8. HSQLDb : 애플리케이션 디비로 인메모리 디비 구현으로 사용
  9. JUnit 4, Mockito, Assertj : 테스트케이스 작성에 사용, spring-boot-starter-test 의존성으로 사용 및 WebMVC등을 위한 spring-*-test 등도 함께 사용

About

닫힌서재!


Languages

Language:JavaScript 61.6%Language:Java 33.1%Language:HTML 2.4%Language:Shell 1.4%Language:Batchfile 1.0%Language:Perl 0.5%