Spring Boot Project Example by Evren Tan

Overview

A Complete Spring Boot Example Project

A Complete Spring Boot Example Project with Spring Boot 2.6.2, JDK 17 & Maven.

Table of Contents

  1. How to Contribute
  2. Requirements
  3. Running the Application Locally
  4. Run Actuator
  5. Run Swagger UI Documentation
  6. Javadoc
  7. Copyright

How to Contribute

For the contributor covenant to this project, please check the Code of Conduct file.

Contributor Covenant

Requirements

For building and running the application belows are required;

Running the application locally

The project can be booted with Spring Cloud Config Server or directly within the application. In order to boot the project within itself, enable the properties in application.properties file and disable bootstrap.properties file.

Application can be run with SpringBootProjectExampleApplication class under evrentan.examples.springbootprojectexample.spring.config.spring package.

Alternatively you can use the Spring Boot Maven plugin like so:

mvn spring-boot:run

Run Actuator

Spring Boot Actuator can be reached from local url for Actuator.

Only health and caches endpoints are enabled by default. Configuration can be updated within the "actuator" section of the related application.properties file. This file can be also in Spring Cloud Config Server if the application is booted with Spring Cloud Config Server.

Javadoc

You can create Javadoc with the below command or directly from your IDE.

mvn javadoc:javadoc

Run Swagger UI Documentation

After running the application, just type the local url for Swagger UI in your browser.

Extra Notes

GitKraken Client

This repo was made with love using GitKraken Client.

Copyright

GNU General Public License v3.0 Permissions of this strong copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights.

Comments
  • Migration to SpringDoc OpenApi from SpringFox

    Migration to SpringDoc OpenApi from SpringFox

    Migration to SpringDoc OpenApi from SpringFox will be implemented. Pls check the below link for how-to migrate from SpringFox to SpringDoc OpenApi

    https://springdoc.org/#migrating-from-springfox

    enhancement 
    opened by evrentan 2
  • feat: Implement Resource Bundle & Localization of Messages

    feat: Implement Resource Bundle & Localization of Messages

    feat: Implement Resource Bundle & Localization of Messages

    • Generate resource bundles for default, en, tr & fr
    • Implement a method in order to get the header of the service request
    • Update GlobalRestExceptionHandler class in order to implement related messages
    enhancement 
    opened by evrentan 0
  • Implement Resource Bundle & Localization of Messages

    Implement Resource Bundle & Localization of Messages

    Is your feature request related to a problem? Please describe. N/A

    Describe the solution you'd like Resource Bundle will be implemented for localization of messages. For this, MessageUtilityServiceImpl class will be generated in order to handle the locale and reading messages from resource bundle.

    Describe alternatives you've considered N/A

    Additional context N/A

    enhancement 
    opened by evrentan 0
  • bug: contextLoads() Test Failed

    bug: contextLoads() Test Failed

    bug: contextLoads() Test Failed

    Fix the test fail case by adding "classes = SpringBootProjectExampleApplication.class" to @SpringBootTest annotation in the related test class.

    Test Execution Result:

    image

    bug 
    opened by evrentan 0
  • contextLoads() Test Failed with java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration

    contextLoads() Test Failed with java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration

    Describe the bug contextLoads() Test Failed with "java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, ou need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test" error.

    To Reproduce Steps to reproduce the behavior:

    1. Run contextLoads test
    2. See error

    Expected behavior Test should be completed successfully.

    Screenshots

    image

    Desktop (please complete the following information): N/A

    Smartphone (please complete the following information): N/A

    Additional context Related SureFire report is attached.

    evrentan.examples.springbootprojectexample.SpringBootProjectExampleApplicationTests.txt

    bug 
    opened by evrentan 0
  • Upgrade Spring Boot Version

    Upgrade Spring Boot Version

    Is your feature request related to a problem? Please describe. N/A

    Describe the solution you'd like As https://github.com/evrentan/spring-boot-project-example/issues/1 is closed, Upgrade Spring Boot Version to 2.6.2 from 2.5.6 can be implemented.

    Describe alternatives you've considered N/A

    Additional context N/A

    enhancement 
    opened by evrentan 0
  • feat: Javadoc Implementation

    feat: Javadoc Implementation

    Javadoc is implemented for each class, method & field.

    And also below changes are implemented;

    • Javadoc maven plugin in added to the project.
    • README.md is updated by adding Javadoc section.
    • org.apache.commons version is updated to 3.12.0 from 2.1
    enhancement 
    opened by evrentan 0
  • Removed duplicate @ResponseBody annotations

    Removed duplicate @ResponseBody annotations

    @RestController annotation is a convenience annotation that is itself annotated with @Controller and @ResponseBody. Therefore, these annotations can be deleted if there is no special reason that I do not know.

    opened by furkaya96 0
  • Javadoc should be written for each class & method for now

    Javadoc should be written for each class & method for now

    Is your feature request related to a problem? Please describe. N/A

    Describe the solution you'd like Javadoc should be written for each class & method for now. With this enhancement, readability of the code base will be improved for everyone.

    Describe alternatives you've considered N/A

    Additional context author & since should also be added to each documentation.

    enhancement 
    opened by evrentan 0
  • feature/openapi-migration

    feature/openapi-migration

    changing swagger ui implementation migration done.

    • springfox related dependencies removed.
    • openapi dependency has been added.
    • swaggerconfig file changed regarding to written in spring documentation.
    • Annotations migrated.
    opened by Erkanerkisi 0
Owner
Evren Tan
A Software Craftsman | Co-Founder of Turkey Java Community | A Java Geek | A JCP Associate Member | A GitKraken Ambassador | A TOGAF 9.2 Architect
Evren Tan
Spring Boot Login and Registration example with MySQL, JWT, Rest Api - Spring Boot Spring Security Login example

Spring Boot Login example with Spring Security, MySQL and JWT Appropriate Flow for User Login and Registration with JWT Spring Boot Rest Api Architect

null 58 Jan 5, 2023
该仓库中主要是 Spring Boot 的入门学习教程以及一些常用的 Spring Boot 实战项目教程,包括 Spring Boot 使用的各种示例代码,同时也包括一些实战项目的项目源码和效果展示,实战项目包括基本的 web 开发以及目前大家普遍使用的线上博客项目/企业大型商城系统/前后端分离实践项目等,摆脱各种 hello world 入门案例的束缚,真正的掌握 Spring Boot 开发。

Spring Boot Projects 该仓库中主要是 Spring Boot 的入门学习教程以及一些常用的 Spring Boot 实战项目教程,包括 Spring Boot 使用的各种示例代码,同时也包括一些实战项目的项目源码和效果展示,实战项目包括基本的 web 开发以及目前大家普遍使用的前

十三 4.5k Dec 30, 2022
循序渐进,学习Spring Boot、Spring Boot & Shiro、Spring Batch、Spring Cloud、Spring Cloud Alibaba、Spring Security & Spring Security OAuth2,博客Spring系列源码:https://mrbird.cc

Spring 系列教程 该仓库为个人博客https://mrbird.cc中Spring系列源码,包含Spring Boot、Spring Boot & Shiro、Spring Cloud,Spring Boot & Spring Security & Spring Security OAuth2

mrbird 24.8k Jan 6, 2023
Spring Boot Security Login example with JWT and H2 example

Spring Boot Security Login example with JWT and H2 example Appropriate Flow for User Login and Registration with JWT and HttpOnly Cookie Spring Boot R

null 50 Dec 21, 2022
Zitadel.ch Example Project with Spring Boot and Spring Security

Zitadel Example Project with Spring Boot and Spring Security This example contains two Spring Boot Apps (app and api) which use the Zitadel IdP as Ope

Thomas Darimont 2 May 3, 2022
Spring Boot JdbcTemplate example with SQL Server: CRUD Rest API using Spring Data JDBC, Spring Web MVC

Spring Boot JdbcTemplate example with SQL Server: Build CRUD Rest API Build a Spring Boot CRUD Rest API example that uses Spring Data Jdbc to make CRU

null 7 Dec 20, 2022
Spring Boot & MongoDB Login and Registration example with JWT, Spring Security, Spring Data MongoDB

Spring Boot Login and Registration example with MongoDB Build a Spring Boot Auth with HttpOnly Cookie, JWT, Spring Security and Spring Data MongoDB. Y

null 15 Dec 30, 2022
Spring Boot JWT Authentication example with Spring Security & Spring Data JPA

Spring Boot JWT Authentication example with Spring Security & Spring Data JPA

null 1 Jan 26, 2022
This is an example of how conditional events can be triggered in Camunda using a simple spring boot project

Camunda Conditional Events Example This example is a Spring Boot Application using Camunda. In this example i'll show a variety of ways that BPMN's Co

Niall 5 Sep 30, 2021
This project contains a full example of an application developed using Spring Boot and GraphQL within the Java.

Spring boot GraphQL Example This project contains a full example of an application developed using GraphQL within the Java. The project includes a com

Haoqiao Wang 3 Jul 20, 2022
Project Basics Example using Spring Boot 3.0

Base Project Spring 3.0 Exaples of the acess - API localhost Method create - POST Content-Type =

Joshua Maia Rodrigues 4 May 9, 2022
Example project of Spring Boot Microservices with the following services School and Student

SpringBootMicroservicesWithDiscoveryGatewayConfig Example project of Spring Boot Microservices with the following services School and Student, additio

Gábor Hutya 2 Nov 28, 2022
Spring boot microservice example with Eureka Server + Eureka Client + Spring Cloud API Gateway + OAuth2.0 + Circuit Breaker + Resilience4J + FeignClient + RestTemplate

Spring boot microservice example Spring boot microservice example with Eureka Server + Eureka Client + Spring Cloud API Gateway + OAuth2.0 + Circuit B

Subhash Lamba 47 Dec 29, 2022
Spring JPA @Query for custom query in Spring Boot example

Spring JPA @Query example (Custom query) in Spring Boot Use Spring JPA @Query for custom query in Spring Boot example: Way to use JPQL (Java Persisten

null 17 Dec 3, 2022
Spring JPA Native Query example in Spring Boot

Spring JPA Native Query example in Spring Boot

null 12 Nov 30, 2022
Spring JPA Many To Many example with Hibernate and Spring Boot CRUD Rest API - ManyToMany annotation

Spring JPA Many To Many example with Hibernate and Spring Boot CRUD Rest API - ManyToMany annotation

null 17 Dec 28, 2022
This module explains about the example of Spring MVC + Database Integration with MySQL using Hibernate ORM with practical coding example and required JAR dependencies

SpringMVC-Database-Integration This module explains about the example of Spring MVC + Database Integration with MySQL using Hibernate ORM with practic

GowthamRaj K 3 Nov 2, 2021
about learning Spring Boot via examples. Spring Boot 教程、技术栈示例代码,快速简单上手教程。

Spring Boot 学习示例 Spring Boot 使用的各种示例,以最简单、最实用为标准,此开源项目中的每个示例都以最小依赖,最简单为标准,帮助初学者快速掌握 Spring Boot 各组件的使用。 Spring Boot 中文索引 | Spring Cloud学习示例代码 | Spring

纯洁的微笑 28.3k Jan 1, 2023
spring boot 实践学习案例,是 spring boot 初学者及核心技术巩固的最佳实践。另外写博客,用 OpenWrite。

推荐工具: 微信公众号 Markdown 编辑器 - OpenWrite:Markdown 微信编辑器是一款专业强大的微信公众平台在线编辑排版工具,提供手机预览功能,让用户在微信图文 、文章、内容排版、文本编辑、素材编辑上更加方便。 - 更多介绍 博客群发平台 一、支持泥瓦匠 Spring Boot

泥瓦匠BYSocket 15.2k Jan 5, 2023