All Projects → barthr → spring-boot-blueprint

barthr / spring-boot-blueprint

Licence: other
Spring Boot blueprint with Keycloak and Vue.js

Programming Languages

Vue
7211 projects
java
68154 projects - #9 most used programming language
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
shell
77523 projects

Projects that are alternatives of or similar to spring-boot-blueprint

spring-boot-login-example
Spring Boot Login and Registration example with MySQL, JWT, Rest Api - Spring Boot Spring Security Login example
Stars: ✭ 50 (+38.89%)
Mutual labels:  spring-security, spring-data-jpa
Javadevjournal
Source code for the tutorials published on the Javadevjournal site.
Stars: ✭ 141 (+291.67%)
Mutual labels:  spring-security, spring-data-jpa
Springboot Restful Angular
springBoot,restful,jwt,angular4 搭建的前后端分离后台管理系统
Stars: ✭ 121 (+236.11%)
Mutual labels:  spring-security, spring-data-jpa
Spring Boot Shopping Cart
Simple shopping cart web app made using Spring Boot + Thymeleaf
Stars: ✭ 85 (+136.11%)
Mutual labels:  spring-security, spring-data-jpa
springboot-vue.js-bbs
Spring Boot, Vue.js
Stars: ✭ 43 (+19.44%)
Mutual labels:  spring-security, spring-data-jpa
Spring Cloud Flycloud
🔥🔥🔥FlyClould 微服务实战项目框架,在该框架中,包括了用 Spring Cloud 构建微服务的一系列基本组件和框架,对于后台服务框架的搭建有很大的参考价值,大家可以参考甚至稍加修改可以直接应用于自己的实际的项目开发中,该项目没有采用Maven进行项目构建,Maven通过xml进行依赖管理,导致整个配置文件太过臃肿,另外灵活性也不是很强,所以我采用Gradle进行项目构建和依赖管理,在FlyTour项目中我们见证了Gradle的强大,通过简单的一些配置就可以轻松的实现组件化的功能。该项目共有11个Module工程。其中10个位微服务工程,这10个微服务工程构成了一个完整的微服务系统,微服务系统包含了8个基础服务,提供了一整套微服务治理功能,他们分别是配置中心module_c…
Stars: ✭ 1,514 (+4105.56%)
Mutual labels:  spring-security, spring-data-jpa
Registration Login Spring Xml Maven Jsp Mysql
Registration and Login Example with Spring MVC, Spring Security, Spring Data JPA, XML Configuration, Maven, JSP, and MySQL.
Stars: ✭ 134 (+272.22%)
Mutual labels:  spring-security, spring-data-jpa
Market
Simple web-market: Spring, JSP, REST, Hibernate (under modernization)
Stars: ✭ 47 (+30.56%)
Mutual labels:  spring-security, spring-data-jpa
Spring Reddit Clone
Reddit clone built using Spring Boot, Spring Security with JPA Authentication, Spring Data JPA with MySQL, Spring MVC. The frontend is built using Angular - You can find the frontend source code here - https://github.com/SaiUpadhyayula/angular-reddit-clone
Stars: ✭ 210 (+483.33%)
Mutual labels:  spring-security, spring-data-jpa
Registration Login Spring Hsql
Registration and Login Example with Spring Security, Spring Boot, Spring Data JPA, HSQL, JSP
Stars: ✭ 208 (+477.78%)
Mutual labels:  spring-security, spring-data-jpa
Springboot Projects Fullstack
Spring Boot, JDBC, ORM, JPA, Hibernate, H2, MySQL, Oracle
Stars: ✭ 76 (+111.11%)
Mutual labels:  spring-security, spring-data-jpa
Diber-backend
Delivery Service - Spring Boot / Spring Data Jpa / Hibernate / PostgreSQL / OAuth2 Application
Stars: ✭ 22 (-38.89%)
Mutual labels:  spring-security, spring-data-jpa
Spring Examples
SpringBoot Examples
Stars: ✭ 67 (+86.11%)
Mutual labels:  spring-security, spring-data-jpa
Spring Mvc Tutorial
Spring MVC 5 Tutorial - Guide to spring mvc framework
Stars: ✭ 121 (+236.11%)
Mutual labels:  spring-security, spring-data-jpa
Springboard
Spring Boot based production grade starter kit.
Stars: ✭ 59 (+63.89%)
Mutual labels:  spring-security, spring-data-jpa
Spring Boot Blog
Simple blog web app made using Spring Boot + Thymeleaf
Stars: ✭ 121 (+236.11%)
Mutual labels:  spring-security, spring-data-jpa
Hellokoding Courses
HelloKoding provides practical coding guides series of Spring Boot, Java, Algorithms, and other topics on software engineering
Stars: ✭ 490 (+1261.11%)
Mutual labels:  spring-security, spring-data-jpa
Springboot Starterkit
Starter Kit for Spring Boot based (REST APIs and WebMVC) micro services.
Stars: ✭ 596 (+1555.56%)
Mutual labels:  spring-security, spring-data-jpa
Spring Microservice Sample
Spring Boot based Mircoservice sample
Stars: ✭ 199 (+452.78%)
Mutual labels:  spring-security, spring-data-jpa
spring-tiles-sample-app
Spring MVC - Apache Tile - AdminLTE Bootstrap template - Sample Application
Stars: ✭ 33 (-8.33%)
Mutual labels:  spring-security, spring-data-jpa

Spring boot starter blueprint 🚀

This project aims to provide a very minimal but modern feature complete blueprint for building and deploying a full stack web application using Spring boot and Vue.js.

This blueprint is useful for people who want to start building a web application with sensible defaults but want to remain flexible.
As a result this blueprint only includes the libraries and config you need to start building, it doesn't provide any application code or structure which help in building web applications. For this you can visit the spring docs which provide many useful samples.

Features

  • Spring Security with Keycloak integration 🔑
  • Migrations using Flyway 📁
  • Database setup using PostgreSQL + Spring Data JPA 📁
  • Vue.js frontend embedded in the jar at build time 📇
  • Testcontainers for integration testing of repositories and other infrastructure
  • Mockito integration for mocking objects and asserting certain behaviour
  • Docker-compose for running required infrastructure locally (Postgres, Keycloak)
  • Integrated dev tools for hot reloading (optional, depending on IDE setup)
  • Simple CI integration for test & build pipeline (Currently only Github actions)

What is this not

  • This is not a full fletched generator like JHipster. So it will not generate all kinds of CRUD logic for you. This is just a barebones blueprint to get your application up and running. See it as a more complete and enhanced version of start.spring.io. Some experience with spring/spring boot is required to start building an application with this blueprint.
  • Using this blueprint is a one time action, it is there to bootstrap your application not provide you with updates along the way.

Requirements

Installation

Retrieving a fresh new copy without any references

git clone https://github.com/barthr/spring-boot-blueprint
cd spring-boot-blueprint
rm -rf .git
git init

Running the application

  1. Start the infrastructure (from root of folder)

This will start a postgres container on localhost:5432 and keycloak which is accessible on http://localhost:8080

cd src/main/docker
docker-compose up -d 
  1. Install dependencies & Start the frontend (from root of folder)

This will start a hot reloaded Vue.js frontend on http://localhost:8081

./gradlew npmInstall
cd src/main/webapp 
cp .env.example .env.local
npm run serve
  1. Fetch dependencies

This will fetch all required dependencies (from the root of the project)

./gradlew dependencies
  1. Run spring boot app

This will run the spring boot app on port 8000

./gradlew bootRun

After executing these steps your frontend is accessible on http://localhost:8081 and the api on http://localhost:8000

Next, head over to http://localhost:8080/auth/admin/master/console/#/realms/spring-boot-blueprint/users login using username: admin and password: admin and create a new user. After creating this user head over to the credentials section and pick a password for this user, you should be able to login with this user in the application

Building for production

Deployment is done using docker and the provided java image from spring boot

There is some config which need to be set:

file: build.gradle:50

bootBuildImage {
    imageName = "<YOUR_IMAGE_NAME>"
}

Set YOUR_IMAGE_NAME to the name you would like to have for your image.

To create a docker image including the frontend

./gradlew buildFrontend bootBuildImage

To create a docker image without the frontend

./gradlew bootBuildImage

Github CI

If you would like to use the provided github actions a couple of more settings are required. First you need to set 2 secrets in your github repository:

DOCKER_USERNAME=<your_username>
DOCKER_PASSWORD=<your_password>

Next you also need to provide which image to push to your registry, this should be the same as the one provided in the build.gradle

file: .github/workflows/gradle.yaml:57

repository: <DOCKER_HUB_NAMESPACE>/<DOCKER_HUB_REPOSITORY>

Frequently asked questions

What if I don't want to use the frontend?

Remove the webapp folder in src/main/webapp and the buildsteps in build.gradle (including the node plugin)

What if I don't wnat to use the github actions?

rm -rf .github

Where can I find the frontend when running the spring boot application?

It is embedded during build time and can be found on the same port as your application

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].