gothinkster/spring-boot-realworld-example-app

Name: spring-boot-realworld-example-app

Owner: Thinkster

Description: Example Spring codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld API spec.

Created: 2017-08-28 17:43:55.0

Updated: 2018-05-21 19:25:35.0

Pushed: 2018-05-11 06:27:58.0

Homepage:

Size: 289

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

RealWorld Example App using Kotlin and Spring

Spring boot + MyBatis codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.

This codebase was created to demonstrate a fully fledged fullstack application built with Spring boot + Mybatis including CRUD operations, authentication, routing, pagination, and more.

For more information on how to this works with other frontends/backends, head over to the RealWorld repo.

How it works

The application uses Spring boot (Web, Mybatis).

And the code organize as this:

  1. api is the web layer to implement by Spring MVC
  2. core is the business model including entities and services
  3. application is the high level services for query with the data transfer objects
  4. infrastructure contains all the implementation classes as the technique details

Security

Integration with Spring Security and add other filter for jwt token process.

The secret key is stored in application.properties.

Database

It uses a H2 in memory database (for now), can be changed easily in the application.properties for any other database.

Getting started

You need Java installed.

./gradlew bootRun
open http://localhost:8080

Try it out with Docker

You need Docker installed.

docker-compose up -d

Run test

The repository contains a lot of test cases to cover both api test and repository test.

./gradlew test

Help

Please fork and PR to improve the code.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.