[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"global-header-tutorials-static":3,"article-multi-build-project-gradle-spring-boot":4,"initial-similar-fetch":23},[],{"alias":5,"title":6,"description":7,"content":8,"thumbnail":9,"keywords":10,"categories":18,"tags":21,"createdAt":22},"multi-build-project-gradle-spring-boot","Setting up a multi-project build in Gradle for Spring Boot","How to set up a multi-project build in Gradle for Spring Boot","{\"type\":\"doc\",\"content\":[{\"type\":\"paragraph\",\"attrs\":{\"textAlign\":null},\"content\":[{\"type\":\"text\",\"text\":\"Creating a multi-build project is the best practice for managing shared code like utils, common,  exception, security configuration, and more.\"}]},{\"type\":\"paragraph\",\"attrs\":{\"textAlign\":null},\"content\":[{\"type\":\"text\",\"text\":\"In this tutorial, we are going to learn how we can setup multi-project build in a Spring Boot application.\"}]},{\"type\":\"heading\",\"attrs\":{\"textAlign\":null,\"level\":2},\"content\":[{\"type\":\"text\",\"text\":\"Configure root project\"}]},{\"type\":\"paragraph\",\"attrs\":{\"textAlign\":null},\"content\":[{\"type\":\"text\",\"text\":\"Let's create a new Java project with Gradle. We are using Intellij Idea go to \"},{\"type\":\"text\",\"marks\":[{\"type\":\"code\"}],\"text\":\"File\"},{\"type\":\"text\",\"text\":\" >> \"},{\"type\":\"text\",\"marks\":[{\"type\":\"code\"}],\"text\":\"New\"},{\"type\":\"text\",\"text\":\" >> \"},{\"type\":\"text\",\"marks\":[{\"type\":\"code\"}],\"text\":\"Project\"},{\"type\":\"text\",\"text\":\" . Here we need to create a plain Java project, the screen and the configuration look as follows:\"}]},{\"type\":\"image\",\"attrs\":{\"src\":\"https:\u002F\u002Fapi.csbyte.com\u002Fuploads\u002Feditor\u002Fd43933e4-a7a3-404b-a300-8f02db98f549_multi-build-project.png\",\"alt\":null,\"title\":null,\"width\":null,\"height\":null}},{\"type\":\"paragraph\",\"attrs\":{\"textAlign\":null},\"content\":[{\"type\":\"text\",\"text\":\"Now, delete the \"},{\"type\":\"text\",\"marks\":[{\"type\":\"code\"}],\"text\":\"src\"},{\"type\":\"text\",\"text\":\" folder from the root project, we don't need the code inside the src folder. We only need the Gradle build configuration.\"}]},{\"type\":\"heading\",\"attrs\":{\"textAlign\":null,\"level\":3},\"content\":[{\"type\":\"text\",\"text\":\"Project Structure\"}]},{\"type\":\"paragraph\",\"attrs\":{\"textAlign\":null},\"content\":[{\"type\":\"text\",\"text\":\"The overall folder structure for a multi-project build will look like as follows.\"}]},{\"type\":\"image\",\"attrs\":{\"src\":\"https:\u002F\u002Fapi.csbyte.com\u002Fuploads\u002Feditor\u002F945fbb4e-bb95-46a5-8e01-e056710e94dd_multi-build-project-folder.png\",\"alt\":null,\"title\":null,\"width\":null,\"height\":null}},{\"type\":\"paragraph\",\"attrs\":{\"textAlign\":null},\"content\":[{\"type\":\"text\",\"text\":\"Here api and utils are the common projects that are utilized inside microservices. And sets of microservices inside the \"},{\"type\":\"text\",\"marks\":[{\"type\":\"code\"}],\"text\":\"microservices\"},{\"type\":\"text\",\"text\":\" folder.\"}]},{\"type\":\"paragraph\",\"attrs\":{\"textAlign\":null},\"content\":[{\"type\":\"text\",\"text\":\"You can create the microservices projects directly from IntelliJ IDEA or from \"},{\"type\":\"text\",\"marks\":[{\"type\":\"link\",\"attrs\":{\"href\":\"https:\u002F\u002Fstart.spring.io\u002F\",\"target\":\"_blank\",\"rel\":\"noopener noreferrer nofollow\",\"class\":null,\"title\":null}}],\"text\":\"Spring Initializer\"},{\"type\":\"text\",\"text\":\".\"}]},{\"type\":\"paragraph\",\"attrs\":{\"textAlign\":null},\"content\":[{\"type\":\"text\",\"text\":\"You can also create the api and utils project as well.\"}]},{\"type\":\"heading\",\"attrs\":{\"textAlign\":null,\"level\":2},\"content\":[{\"type\":\"text\",\"text\":\"Configure settings.gradle\"}]},{\"type\":\"paragraph\",\"attrs\":{\"textAlign\":null},\"content\":[{\"type\":\"text\",\"text\":\"Now, let's configure the \"},{\"type\":\"text\",\"marks\":[{\"type\":\"code\"}],\"text\":\"settings.gradle\"},{\"type\":\"text\",\"text\":\" file. Here, we basically  include all the sub-projects inside the parent.\"}]},{\"type\":\"codeBlock\",\"attrs\":{\"language\":\"java\"},\"content\":[{\"type\":\"text\",\"text\":\"rootProject.name = 'microservice-app'\\ninclude ':api'\\ninclude ':utils'\\ninclude 'microservices:inventory-service'\\ninclude 'microservices:payment-service'\\ninclude 'microservices:product-service'\\ninclude 'microservices:review-service'\"}]},{\"type\":\"paragraph\",\"attrs\":{\"textAlign\":null},\"content\":[{\"type\":\"text\",\"text\":\"Now reload the project. You can see the floating Gradle icon at the top right corner once the \"},{\"type\":\"text\",\"marks\":[{\"type\":\"code\"}],\"text\":\"settings.gradle\"},{\"type\":\"text\",\"text\":\" file is changed. Or Intellij Idea provides the Gradle button to refresh, click on it to reload, and download the dependencies of all the projects that are set up inside the parent project.\"}]},{\"type\":\"image\",\"attrs\":{\"src\":\"https:\u002F\u002Fapi.csbyte.com\u002Fuploads\u002Feditor\u002F58011cb0-d837-497c-8147-b3e18f79a814_buld.gradle.png\",\"alt\":null,\"title\":null,\"width\":null,\"height\":null}},{\"type\":\"heading\",\"attrs\":{\"textAlign\":null,\"level\":2},\"content\":[{\"type\":\"text\",\"text\":\"Build the entire project\"}]},{\"type\":\"paragraph\",\"attrs\":{\"textAlign\":null},\"content\":[{\"type\":\"text\",\"text\":\"Open the terminal, navigate to the parent project, and build the entire project\"}]},{\"type\":\"codeBlock\",\"attrs\":{\"language\":\"bash\"},\"content\":[{\"type\":\"text\",\"text\":\".\u002Fgradlew build\"}]},{\"type\":\"heading\",\"attrs\":{\"textAlign\":null,\"level\":3},\"content\":[{\"type\":\"text\",\"text\":\"Run a specific microservice\"}]},{\"type\":\"codeBlock\",\"attrs\":{\"language\":\"bash\"},\"content\":[{\"type\":\"text\",\"text\":\".\u002Fgradlew :microservices:product-service:bootRun\"}]},{\"type\":\"heading\",\"attrs\":{\"textAlign\":null,\"level\":3},\"content\":[{\"type\":\"text\",\"text\":\"Build a specific microservice\"}]},{\"type\":\"codeBlock\",\"attrs\":{\"language\":\"bash\"},\"content\":[{\"type\":\"text\",\"text\":\".\u002Fgradlew :microservices:product-service:clean build\"}]},{\"type\":\"paragraph\",\"attrs\":{\"textAlign\":null},\"content\":[{\"type\":\"text\",\"text\":\"This setup is best practice for developing microservices in a small team that doesn't required the separte developement team for development. Also, to run multiple microservices locally.\"}]}]}","https:\u002F\u002Fapi.csbyte.com\u002Fuploads\u002Feditor\u002Fd43933e4-a7a3-404b-a300-8f02db98f549_multi-build-project.png",[11,12,13,14,15,16,17],"programming","coding","spring-boot-4","java","spring","spring-boot","spring-framework-7",[19,20],"Spring Framework","Spring Boot",[15,16],"2026-06-12T04:15:23.045Z",[24,31,37,43,48,54,60,66],{"alias":25,"title":26,"description":27,"thumbnail":28,"createdAt":29,"tutorialAlias":30,"lessonAlias":30},"java-version-mismatch-gradle","Java Version Mismatch for Gradle Build","How to Fix Gradle Error: Dependency requires at least JVM runtime version 17. This build uses a Java 8 JVM","\u002Fuploads\u002Fthumbnails\u002Fa4c6c910-5623-4db9-93f5-a515135adb99_gradle_version_mismatc.jpeg","2026-06-09T12:15:21.729Z",null,{"alias":32,"title":33,"description":34,"thumbnail":35,"createdAt":36,"tutorialAlias":30,"lessonAlias":30},"constructor-confusion-in-spring","Constructor Confusion in Spring Framework","Constructor Confusion and how to handle it in Spring Framework","\u002Fuploads\u002Fthumbnails\u002Fd0f09fc0-e1f9-49d1-bf9a-7d1c41050196_di_confusio.jpeg","2026-05-21T14:13:31.437Z",{"alias":38,"title":39,"description":40,"thumbnail":41,"createdAt":42,"tutorialAlias":30,"lessonAlias":30},"dependency-pull-lookup-spring","Dependency Pull and Contextualized Dependency Lookup in Spring Framework","Dependency Pull and Contextualized Dependency Lookup IoC Types in Spring Framework","\u002Fuploads\u002Fthumbnails\u002Fd1132443-313b-4dce-b713-55f356ef6051_depndency_pull.png","2026-05-20T15:26:06.494Z",{"alias":44,"title":45,"description":45,"thumbnail":46,"createdAt":47,"tutorialAlias":30,"lessonAlias":30},"types-of-dependency-injection-spring","Types of Dependency Injection in Spring Framework","\u002Fuploads\u002Fthumbnails\u002Fafb32399-6dda-41c4-b07c-7decb8257bbb_di_constructor_sette.jpeg","2026-05-19T17:01:51.972Z",{"alias":49,"title":50,"description":51,"thumbnail":52,"createdAt":53,"tutorialAlias":30,"lessonAlias":30},"spring-framework-project-for-gradle-with-intellij-idea","How to create a clean Spring Framework project for Gradle with IntelliJ IDEA","Create a clean Spring Framework project for Gradle with IntelliJ IDEA","https:\u002F\u002Fapi.csbyte.com\u002Fuploads\u002Feditor\u002F0e4abad5-17e2-4311-8cf0-7d8f67af975a_spring-framework.png","2026-05-19T10:28:20.866Z",{"alias":55,"title":56,"description":57,"thumbnail":58,"createdAt":59,"tutorialAlias":30,"lessonAlias":30},"spring-dependency-injection-and-inversion-control","Dependency Injection (DI) and Inversion of Control (IoC) in Spring","Mastering Dependency Injection (DI) and Inversion of Control (IoC) in Spring: A Practical Guide for Building a Notification System","\u002Fuploads\u002Fthumbnails\u002F53c64b94-f188-40b4-9ae9-ad97612d688b_spring_d.jpeg","2026-05-19T05:31:45.138Z",{"alias":61,"title":62,"description":63,"thumbnail":64,"createdAt":65,"tutorialAlias":30,"lessonAlias":30},"setting-nginx-ssl-for-spring-boot-application","Setup Nginx and SSL for Spring Boot Application","Setting Nginx as a reverse proxy in our Spring Boot application","\u002Fuploads\u002Fthumbnails\u002F5433c987-9e86-4d90-9cce-a831d1598ba4_spring-boot-nginx.png","2026-05-04T05:36:23.075Z",{"alias":67,"title":68,"description":69,"thumbnail":70,"createdAt":71,"tutorialAlias":30,"lessonAlias":30},"deploy-spring-boot-application-with-docker","Deploy Spring Boot Application with Docker on Ubuntu Server","The ultimate guide to deploying our Spring Boot application with Docker on an Ubuntu server","https:\u002F\u002Fapi.csbyte.com\u002Fuploads\u002Feditor\u002F55a11844-d1e9-4e83-80e5-c6bb6df7d58b_intellij-idea-build.png","2026-05-03T05:58:55.642Z"]