{"id":119872,"date":"2023-09-21T01:47:43","date_gmt":"2023-09-20T22:47:43","guid":{"rendered":"https:\/\/examples.javacodegeeks.com\/?p=119872"},"modified":"2023-09-21T01:47:45","modified_gmt":"2023-09-20T22:47:45","slug":"docker-compose-support-in-spring-boot","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/","title":{"rendered":"Docker Compose Support in Spring Boot"},"content":{"rendered":"<p>In today&#8217;s rapidly evolving software landscape, the efficient deployment and management of applications are paramount. This article explores the pivotal role of Docker Compose support in Spring Boot 3 and why it is indispensable for modern Spring Boot applications.<\/p>\n<h2 class=\"wp-block-heading\">1. Introduction<\/h2>\n<p>As applications become increasingly complex and microservices-oriented, orchestrating multiple containers efficiently is a challenging task. <a href=\"https:\/\/docs.docker.com\/compose\/\">Docker Compose<\/a> offers a robust solution, allowing developers to define, configure, and run multi-container applications seamlessly.<\/p>\n<p>For Spring Boot applications, Docker Compose support provides a compelling advantage. It simplifies the deployment process, promotes scalability, and ensures consistency across development, testing, and production environments. By embracing Docker Compose, Spring Boot applications can thrive in today&#8217;s dynamic and competitive software ecosystem.<\/p>\n<h2 class=\"wp-block-heading\">2. Spring Boot 3 Docker Compose Features<\/h2>\n<p>Before Spring Boot 3.1, integrating such Docker Compose services into your application required manual configuration. Developers had to specify host ports, usernames, passwords, and other details in their application properties. This approach posed challenges, especially when dynamic ports changed upon container restarts.<\/p>\n<p>With Spring Boot 3.1, handling Docker Compose services becomes remarkably straightforward. You can continue using dynamic host ports without the hassle of configuring properties or worrying about port conflicts. Here&#8217;s how Spring Boot 3.1 simplifies the process:<\/p>\n<figure class=\"wp-block-table\">\n<table>\n<tbody>\n<tr>\n<td><strong>Feature<\/strong><\/td>\n<td><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td>Automatic Docker Compose Management<\/td>\n<td>Spring Boot 3.1 detects the presence of a Docker Compose file and handles the execution of <code>docker compose up<\/code> automatically. It ensures that required services are running or starts them when necessary.<\/td>\n<\/tr>\n<tr>\n<td>Seamless Connection<\/td>\n<td>The magic happens behind the scenes. Spring Boot 3.1 seamlessly connects to Docker Compose services, eliminating the need for you to remember port numbers, usernames, or passwords.<\/td>\n<\/tr>\n<tr>\n<td>Graceful Shutdown<\/td>\n<td>No more lingering Docker containers consuming memory. Spring Boot 3.1 takes care of shutting down Docker Compose services with <code>docker compose stop<\/code> when your application gracefully exits.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p><strong>Effortless Development and Deployment<\/strong><\/p>\n<p>Thanks to Spring Boot 3.1&#8217;s Docker Compose support, all you need is the <code>compose.yaml<\/code> file. Spring Boot figures out the rest, making development and deployment almost effortless. It&#8217;s a leap forward in simplifying microservices development and ensuring that your applications work seamlessly within a containerized environment.<\/p>\n<p><strong>Supported Docker Images<\/strong><\/p>\n<p>As of now, Spring Boot 3.1 supports a variety of Docker images, including Cassandra, Elasticsearch, Oracle Database, MariaDB, Microsoft SQL Server, MySQL, PostgreSQL, MongoDB, RabbitMQ, Redis, and Zipkin. This extensive support caters to a wide range of application needs.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<h2 class=\"wp-block-heading\">3. Create a Spring Boot Project<\/h2>\n<p>You can use the Spring Initializer or your preferred method to create a Spring Boot project. Make sure to include the necessary dependencies for web, actuator, and Docker Compose support in your project.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-15-46-1.jpg\"><img decoding=\"async\" width=\"1024\" height=\"469\" src=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-15-46-1-1024x469.jpg\" alt=\"Fig.1: Spring boot Initializer.\" class=\"wp-image-119984\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-15-46-1-1024x469.jpg 1024w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-15-46-1-300x137.jpg 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-15-46-1-768x352.jpg 768w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-15-46-1.jpg 1162w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Fig.1: Spring boot Initializer.<\/figcaption><\/figure>\n<\/div>\n<h3 class=\"wp-block-heading\">3.1 Spring Boot pom.xml<\/h3>\n<p>Here is our <code>pom.xml<\/code> file of our test run:<\/p>\n<pre class=\"brush:xml\">\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\n&lt;project xmlns=&quot;http:\/\/maven.apache.org\/POM\/4.0.0&quot; xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot;\n\txsi:schemaLocation=&quot;http:\/\/maven.apache.org\/POM\/4.0.0 https:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd&quot;&gt;\n\t&lt;modelVersion&gt;4.0.0&lt;\/modelVersion&gt;\n\t&lt;parent&gt;\n\t\t&lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n\t\t&lt;artifactId&gt;spring-boot-starter-parent&lt;\/artifactId&gt;\n\t\t&lt;version&gt;3.1.3&lt;\/version&gt;\n\t\t&lt;relativePath\/&gt; &lt;!-- lookup parent from repository --&gt;\n\t&lt;\/parent&gt;\n\t&lt;groupId&gt;com.example&lt;\/groupId&gt;\n\t&lt;artifactId&gt;Docker-Compose-Support-in-Spring-Boot-Applications&lt;\/artifactId&gt;\n\t&lt;version&gt;0.0.1-SNAPSHOT&lt;\/version&gt;\n\t&lt;name&gt;Docker-Compose-Support-in-Spring-Boot-Applications&lt;\/name&gt;\n\t&lt;description&gt;Demo project for Spring Boot&lt;\/description&gt;\n\t&lt;properties&gt;\n\t\t&lt;java.version&gt;17&lt;\/java.version&gt;\n\t&lt;\/properties&gt;\n\t&lt;dependencies&gt;\n\t\t&lt;dependency&gt;\n\t\t\t&lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n\t\t\t&lt;artifactId&gt;spring-boot-starter&lt;\/artifactId&gt;\n\t\t&lt;\/dependency&gt;\n\n\t\t&lt;dependency&gt;\n\t\t\t&lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n\t\t\t&lt;artifactId&gt;spring-boot-starter-web&lt;\/artifactId&gt;\n\t\t&lt;\/dependency&gt;\n\n\t\t&lt;dependency&gt;\n\t\t\t&lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n\t\t\t&lt;artifactId&gt;spring-boot-docker-compose&lt;\/artifactId&gt;\n\t\t\t&lt;scope&gt;runtime&lt;\/scope&gt;\n\t\t\t&lt;optional&gt;true&lt;\/optional&gt;\n\t\t&lt;\/dependency&gt;\n\t\t&lt;dependency&gt;\n\t\t\t&lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n\t\t\t&lt;artifactId&gt;spring-boot-starter-actuator&lt;\/artifactId&gt;\n\t\t&lt;\/dependency&gt;\n\n\t\t&lt;dependency&gt;\n\t\t\t&lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n\t\t\t&lt;artifactId&gt;spring-boot-starter-test&lt;\/artifactId&gt;\n\t\t\t&lt;scope&gt;test&lt;\/scope&gt;\n\t\t&lt;\/dependency&gt;\n\t&lt;\/dependencies&gt;\n\n\t&lt;build&gt;\n\t\t&lt;plugins&gt;\n\t\t\t&lt;plugin&gt;\n\t\t\t\t&lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n\t\t\t\t&lt;artifactId&gt;spring-boot-maven-plugin&lt;\/artifactId&gt;\n\t\t\t&lt;\/plugin&gt;\n\t\t&lt;\/plugins&gt;\n\t&lt;\/build&gt;\n\n&lt;\/project&gt;\n<\/pre>\n<h3 class=\"wp-block-heading\">3.2 Create a Docker Compose File<\/h3>\n<p>We create a file named <code>compose.yml<\/code> to define our services, and we save it in the project&#8217;s source folder. In this example, we will setup two different services:<\/p>\n<ul class=\"wp-block-list\">\n<li>postgres<\/li>\n<li>redis<\/li>\n<\/ul>\n<p>This is our file:<\/p>\n<pre class=\"brush:yml\">\nversion: '3.1'\n\nservices:\n  db:\n    image: postgres\n    environment:\n      POSTGRES_USER: postgres\n      POSTGRES_PASSWORD: p@ssw0rd\n      POSTGRES_DB: book\n    ports:\n      - &quot;5432:5432&quot;\n    volumes:\n      - postgres_dev:\/var\/lib\/postgresql\/data\n\n  redis:\n    image: &quot;redis\/redis-stack:latest&quot;\n    ports:\n      - &quot;6379:6379&quot;\n      - &quot;8001:8001&quot;\n    environment:\n      - REDIS_REPLICATION_MODE=master\n\nvolumes:\n  postgres_dev:\n<\/pre>\n<h2 class=\"wp-block-heading\">4. Run the Spring Boot Application<\/h2>\n<p>You can run the Spring Boot application using your IDE.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-18-00.jpg\"><img decoding=\"async\" width=\"1024\" height=\"75\" src=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-18-00-1024x75.jpg\" alt=\"Fig. 2: Run the Spring Boot Application\" class=\"wp-image-119978\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-18-00-1024x75.jpg 1024w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-18-00-300x22.jpg 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-18-00-768x56.jpg 768w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-18-00.jpg 1193w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Fig. 2: Run the Spring Boot Application<\/figcaption><\/figure>\n<\/div>\n<p>By running this command<\/p>\n<pre class=\"brush:bash\">docker ps -a<\/pre>\n<p>We can see that two containers were created and running as long as our spring boot application is still running.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-01-13.jpg\"><img decoding=\"async\" width=\"1008\" height=\"157\" src=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-01-13.jpg\" alt=\"Fig. 3: docker compose containers\" class=\"wp-image-119980\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-01-13.jpg 1008w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-01-13-300x47.jpg 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-01-13-768x120.jpg 768w\" sizes=\"(max-width: 1008px) 100vw, 1008px\" \/><\/a><figcaption class=\"wp-element-caption\">Fig. 3: docker compose containers<\/figcaption><\/figure>\n<\/div>\n<p>When we kill the application, the two containers are also terminated!<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-19-13.jpg\"><img decoding=\"async\" width=\"890\" height=\"181\" src=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-19-13.jpg\" alt=\"Fig. 4: docker compose containers exited\" class=\"wp-image-119981\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-19-13.jpg 890w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-19-13-300x61.jpg 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-19-13-768x156.jpg 768w\" sizes=\"(max-width: 890px) 100vw, 890px\" \/><\/a><figcaption class=\"wp-element-caption\">Fig. 4: docker compose containers exited<\/figcaption><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\">5. Testing Docker Compose Support<\/h2>\n<p>You can test the application by making HTTP requests to the defined endpoints.<\/p>\n<p>For example, we can go to this url:<\/p>\n<pre class=\"brush:html\">http:\/\/localhost:8080\/actuator\/health<\/pre>\n<p>And see that our Spring Boot Application is indeed running.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-14-57.jpg\"><img decoding=\"async\" width=\"300\" height=\"157\" src=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-14-57.jpg\" alt=\"Fig. 5: Spring Boot App\" class=\"wp-image-119982\"\/><\/a><figcaption class=\"wp-element-caption\">Fig. 5: Spring Boot App<\/figcaption><\/figure>\n<\/div>\n<p>To check that our containers are accessible, we can go to our data structure store, Redis, using this url:<\/p>\n<pre class=\"brush:html\">http:\/\/localhost:8001\/\n<\/pre>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-14-05.jpg\"><img decoding=\"async\" src=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-14-05.jpg\" alt=\"Fig. 6: Redis data structure store - Docker Compose Support\" class=\"wp-image-119983\" style=\"width:683px;height:605px\" width=\"683\" height=\"605\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-14-05.jpg 681w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Screenshot_2023-09-15_13-14-05-300x266.jpg 300w\" sizes=\"(max-width: 683px) 100vw, 683px\" \/><\/a><figcaption class=\"wp-element-caption\">Fig. 6: Redis data structure store &#8211; Docker Compose Support<\/figcaption><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\">6. Download the Source Code<\/h2>\n<p>This was an example of how to integrate Docker Compose into our Spring Boot Application.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here: <a href=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/Docker-Compose-Support-in-Spring-Boot-Applications.zip\"><strong>Docker Compose Support in Spring Boot Applications<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In today&#8217;s rapidly evolving software landscape, the efficient deployment and management of applications are paramount. This article explores the pivotal role of Docker Compose support in Spring Boot 3 and why it is indispensable for modern Spring Boot applications. 1. Introduction As applications become increasingly complex and microservices-oriented, orchestrating multiple containers efficiently is a challenging &hellip;<\/p>\n","protected":false},"author":241,"featured_media":1248,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1390],"tags":[1276,1386],"class_list":["post-119872","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-boot","tag-docker","tag-spring-boot"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Docker Compose Support in Spring Boot - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"In this article, Docker Compose Support in Spring Boot Applications, we uncover the pivotal support that enhances the development experience!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Docker Compose Support in Spring Boot - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"In this article, Docker Compose Support in Spring Boot Applications, we uncover the pivotal support that enhances the development experience!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-20T22:47:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-20T22:47:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/spring-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Odysseas Mourtzoukos\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Odysseas Mourtzoukos\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/\"},\"author\":{\"name\":\"Odysseas Mourtzoukos\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/521138aa5aedaad0710ce6c488872ebc\"},\"headline\":\"Docker Compose Support in Spring Boot\",\"datePublished\":\"2023-09-20T22:47:43+00:00\",\"dateModified\":\"2023-09-20T22:47:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/\"},\"wordCount\":644,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/spring-logo.jpg\",\"keywords\":[\"docker\",\"spring boot\"],\"articleSection\":[\"Boot\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/\",\"name\":\"Docker Compose Support in Spring Boot - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/spring-logo.jpg\",\"datePublished\":\"2023-09-20T22:47:43+00:00\",\"dateModified\":\"2023-09-20T22:47:45+00:00\",\"description\":\"In this article, Docker Compose Support in Spring Boot Applications, we uncover the pivotal support that enhances the development experience!\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/spring-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/spring-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java Development\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"spring\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/spring\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Boot\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/spring\/boot\/\"},{\"@type\":\"ListItem\",\"position\":6,\"name\":\"Docker Compose Support in Spring Boot\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/521138aa5aedaad0710ce6c488872ebc\",\"name\":\"Odysseas Mourtzoukos\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/Photo-96x96.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/Photo-96x96.jpg\",\"caption\":\"Odysseas Mourtzoukos\"},\"description\":\"Mourtzoukos Odysseas is studying to become a software engineer, at Harokopio University of Athens. Along with his studies, he is getting involved with different projects on gaming development and web applications. He is looking forward to sharing his knowledge and experience with the world.\",\"sameAs\":[\"https:\/\/www.javacodegeeks.com\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/odysseas-mourtzoukos\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Docker Compose Support in Spring Boot - Java Code Geeks","description":"In this article, Docker Compose Support in Spring Boot Applications, we uncover the pivotal support that enhances the development experience!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/","og_locale":"en_US","og_type":"article","og_title":"Docker Compose Support in Spring Boot - Java Code Geeks","og_description":"In this article, Docker Compose Support in Spring Boot Applications, we uncover the pivotal support that enhances the development experience!","og_url":"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2023-09-20T22:47:43+00:00","article_modified_time":"2023-09-20T22:47:45+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/spring-logo.jpg","type":"image\/jpeg"}],"author":"Odysseas Mourtzoukos","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Odysseas Mourtzoukos","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/"},"author":{"name":"Odysseas Mourtzoukos","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/521138aa5aedaad0710ce6c488872ebc"},"headline":"Docker Compose Support in Spring Boot","datePublished":"2023-09-20T22:47:43+00:00","dateModified":"2023-09-20T22:47:45+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/"},"wordCount":644,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/spring-logo.jpg","keywords":["docker","spring boot"],"articleSection":["Boot"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/","url":"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/","name":"Docker Compose Support in Spring Boot - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/spring-logo.jpg","datePublished":"2023-09-20T22:47:43+00:00","dateModified":"2023-09-20T22:47:45+00:00","description":"In this article, Docker Compose Support in Spring Boot Applications, we uncover the pivotal support that enhances the development experience!","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/spring-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/spring-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/docker-compose-support-in-spring-boot\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java Development","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/"},{"@type":"ListItem","position":4,"name":"spring","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/spring\/"},{"@type":"ListItem","position":5,"name":"Boot","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/spring\/boot\/"},{"@type":"ListItem","position":6,"name":"Docker Compose Support in Spring Boot"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/521138aa5aedaad0710ce6c488872ebc","name":"Odysseas Mourtzoukos","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/Photo-96x96.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/Photo-96x96.jpg","caption":"Odysseas Mourtzoukos"},"description":"Mourtzoukos Odysseas is studying to become a software engineer, at Harokopio University of Athens. Along with his studies, he is getting involved with different projects on gaming development and web applications. He is looking forward to sharing his knowledge and experience with the world.","sameAs":["https:\/\/www.javacodegeeks.com"],"url":"https:\/\/examples.javacodegeeks.com\/author\/odysseas-mourtzoukos\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/119872","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/241"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=119872"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/119872\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/1248"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=119872"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=119872"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=119872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}