Coder Social home page Coder Social logo

springboot-blog-16's Introduction

Project build a simple blog

Build Status

The main idea from this project is put together some concepts like RESTFull, authentication by Json Web Token and separate the development from the backend and frontend.

This project is in Java and is a alternative to SpringBoot Kotlin Blog where the frontend is Vue Blog Project. Obs: This project is based to communicate with Vue-auth.

A special thanks to @bfwg your code help a lot. See: Springboot Jwt Starter.

Main Framework

Development

The authentication is by JWT between backend and frontend, the responsible for this is Spring Security.

This project run in the port 8081 because the Vue Blog Project run in 8080, but you can change this according to you need, so try it with gradle installed:

$ gradle bootRun

and to test:

$ ./gradlew test

Test

Is different but here because I use PostgreSQL to development and together H2 to test, maybe in your job can be more databases:

  • local (First for our tests, create new feature or correct some bug)
  • test (db where run test after build)
  • dev (development new or correct some feature)
  • production

So I use the annotation @ActiveProfiles('test') in my classes of test for use runtime H2 database, you can see this declaration in the build.gradle and to work I use application-test.properties to put more information.

For development in the application.properties I declare my profile

spring.profiles.active: dev

This read the application-dev.properties where I declare the configuration of my database in PostgreSQL.

Deploy

Table

  • User: User from blog.
  • Post: Its my post, have a author and many tags.
  • Tag: One post can be one or more tags.
  • Role: Each Author has one or more role for now can be Standard User and Administrator.

Obs: I put the suffix blog_ in each table.

Routes

Coming soon.

Tools

References

springboot-blog-16's People

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.