GithubHelp home page GithubHelp logo

anthrax3 / spring-boot-realworld-example-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gothinkster/spring-boot-realworld-example-app

0.0 1.0 0.0 254 KB

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

Java 100.00%

spring-boot-realworld-example-app's Introduction

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

  • Use the idea of Domain Driven Design to separate the business term and infrastruture term.
  • Use MyBatis to implement the Data Mapper pattern for persistence.
  • Use CQRS pattern to separate the read model and write model.

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.

spring-boot-realworld-example-app's People

Contributors

aisensiy avatar darioseidl avatar robertglenn avatar vileneera 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.