8000 GitHub - evrimulgen/spring-boot-blog-app: Application to demonstrate several features of Spring Boot
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

evrimulgen/spring-boot-blog-app

 
 

Repository files navigation

A BlogApp with Spring Boot

Intro

This is a simple micro blogging application where you can post a note/blog with attachments and other can view it.

The default username/passwords are listed on : gt.app.Application.initData, which are:

  • system/pass
  • user1/pass
  • user2/pass

Requirements

How to Run

  • Clone/Download and Import project into your IDE, compile and run Application.java

  • Update run configuration to run maven goal wro4j:run Before Launch. It should be after 'Build' OR

  • mvnw compile spring-boot:run //if you don't have maven installed in your PC

OR

  • mvn compile spring-boot:run //if you have maven installed in your PC

And open http://localhost:8080 on your browser

Included Features/Samples

  • Modular application
  • Data JPA with User/Authority/Note/ReceivedFile entities, example of EntityGraph
  • Default test data created while running the app
  • Public and internal pages
  • MVC with thymeleaf templating
  • File upload/download
  • Live update of thymeleaf templates for local development
  • HTML fragments
  • webjar - bootstrap4 + jquery
  • Custom Error page
  • Request logger filter
  • Swagger API Docs with UI ( http://localhost:8080/swagger-ui.html)
  • @RestControllerAdvice, @ControllerAdvice demo
  • CRUD Note + File upload
  • Spring / Maven profiles for dev/prod ...
  • Dockerfile to run images
  • Docker maven plugin to publish images (follow docker-steps.md)
  • Deploy to Amazon EC2 ( follow docker-steps.md )
  • Code Generation: lombok, mapstruct
  • H2 db for local, Console enabled for local ( http://localhost:8080/h2-console/, db url: jdbc:h2:mem:testdb, username: sa)
  • MySQL or any other SQL db can be configured for prod/docker etc profiles
  • User/User_Authority entity and repository/services
    • login, logout, home pages based on user role
  • Security with basic config
  • Domain object Access security check on update/delete using custom PermissionEvaluator
  • public home page -- view all notes by all
  • private pages based on user roles
  • Test cases - unit/integration with JUnit 5, Mockito and Spring Test
  • Tests with Spock Framework (Groovy 3, Spock 2)
  • e2e with Selenide, fixtures. default data generated using Spring
  • Architecture test using ArchUnit
  • Email
  • Account management/Signup UI

Future: do more stuff

  • background jobs with Quartz
  • Liquibase/Flyway change log
  • Integrate Markdown editor for writing notes

SonarQube scan

Run sonarqube:

docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube

Perform scan:

mvn sonar:sonar

Screenshots:

Public View

Logged in Feed View

Logged in List View

About

Application to demonstrate several features of Spring Boot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 79.0%
  • HTML 17.6%
  • Groovy 2.7%
  • Other 0.7%
0