{"id":31826,"date":"2014-10-26T15:00:35","date_gmt":"2014-10-26T13:00:35","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=31826"},"modified":"2014-10-26T14:15:46","modified_gmt":"2014-10-26T12:15:46","slug":"spring-boot-java-8-tomcat-8-on-openshift-with-diy","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2014\/10\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html","title":{"rendered":"Spring Boot \/ Java 8 \/ Tomcat 8 on Openshift with DIY"},"content":{"rendered":"<p>DIY cartridge is an experimental cartridge that provides a way to test unsupported languages on OpenShift. It <em>provides a minimal, free-form scaffolding which leaves all details of the cartridge to the application developer<\/em>. This blog post illustrates the use of Spring Boot \/ Java 8 \/ Tomcat 8 application with PostgreSQL service bound to it.<\/p>\n<h2>Creating new application<\/h2>\n<h2>Prerequisite<\/h2>\n<p>Before we can start building the application, we need to have an OpenShift free account and client tools installed.<\/p>\n<h2>Step 1: Create DIY application<\/h2>\n<p>To create an application using client tools, type the following command:<\/p>\n<pre class=\" brush:java\">rhc app create boot diy-0.1<\/pre>\n<p>This command creates an application <em>boot<\/em> using <em>DIY<\/em> cartridge and clones the repository to <em>boot<\/em> directory.<\/p>\n<h2>Step 2: Add PostgreSQL cartridge to application<\/h2>\n<p>The application we are creating will use PostgreSQL database, hence we need to add appropriate cartridge to the application:<\/p>\n<pre class=\" brush:java\">rhc cartridge add postgresql-9.2 --app boot<\/pre>\n<p>After creating the cartridge, it is possible to check its status with the following command:<\/p>\n<pre class=\" brush:java\">rhc cartridge status postgresql-9.2 --app boot<\/pre>\n<h2>Step 3: Delete Template Application Source code<\/h2>\n<p>OpenShift creates a template project that can be freely removed:<\/p>\n<pre class=\" brush:java\">git rm -rf .openshift README.md diy misc<\/pre>\n<p>Commit the changes:<\/p>\n<pre class=\" brush:java\">git commit -am \"Removed template application source code\"<\/pre>\n<h2>Step 4: Pull Source code from GitHub<\/h2>\n<pre class=\" brush:java\">git remote add upstream https:\/\/github.com\/kolorobot\/openshift-diy-spring-boot-sample.git\r\ngit pull -s recursive -X theirs upstream master<\/pre>\n<h2>Step 5: Push changes<\/h2>\n<p>The basic template is ready to be pushed:<\/p>\n<pre class=\" brush:java\">git push<\/pre>\n<p>The initial deployment (build and application startup) will take some time (up to several minutes). Subsequent deployments are a bit faster, although starting Spring Boot application may take even more than 2 minutes on small Gear:<\/p>\n<pre class=\" brush:java\">Tomcat started on port(s): 8080\/http\r\nStarted Application in 125.511 seconds<\/pre>\n<p>You can now browse to: <a href=\"http:\/\/boot-yournamespace.rhcloud.com\/manage\/health\">http:\/\/boot-yournamespace.rhcloud.com\/manage\/health<\/a> and you should see:<\/p>\n<pre class=\" brush:java\">{\r\n    \"status\": \"UP\",\r\n    \"database\": \"PostgreSQL\",\r\n    \"hello\": 1\r\n}<\/pre>\n<p>You can also browser the API. To find out what options you have, navigate to the root of the application. You should see the resource root with links to available resources:<\/p>\n<pre class=\" brush:java\">{\r\n  \"_links\" : {\r\n    \"person\" : {\r\n      \"href\" : \"http:\/\/boot-yournamespace.rhcloud.com\/people{?page,size,sort}\",\r\n      \"templated\" : true\r\n    }\r\n  }\r\n}<\/pre>\n<p>Navigating to <a href=\"http:\/\/boot-yournamespace.rhcloud.com\/people\">http:\/\/boot-yournamespace.rhcloud.com\/people<\/a> should return all people from the database.<\/p>\n<h2>Step 6: Adding Jenkins<\/h2>\n<p>Using Jenkins has some advantages. One of them is that the build takes place in it\u2019s own Gear. To build with Jenkins, OpenShift needs a server and a Jenkins client cartridge attached to the application. Creating Jenkins application:<\/p>\n<pre class=\" brush:java\">rhc app create ci jenkins<\/pre>\n<p>And attaching Jenkins client to the application:<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\" brush:java\">rhc cartridge add jenkins-client --app boot<\/pre>\n<p>You can now browse to: <a href=\"http:\/\/ci-\">http:\/\/ci-<\/a>.rhcloud.com and login with the credentials provided. When you make next changes and push them, the build will be triggered by Jenkins:<\/p>\n<pre class=\" brush:java\">remote: Executing Jenkins build.\r\nremote:\r\nremote: You can track your build at https:\/\/ci-&lt;namespace&gt;.rhcloud.com\/job\/boot-build\r\nremote:\r\nremote: Waiting for build to schedule.........<\/pre>\n<p>And when you observe the build result, the application starts a bit faster on Jenkins.<\/p>\n<h2>Under the hood<\/h2>\n<h2>Why DIY?<\/h2>\n<p>Spring Boot application can be deployed to Tomcat cartridge on OpenShift. But at this moment no Tomcat 8 and Java 8 support exists, therefore DIY was selected. DIY has limitations: it cannot be scaled for example. But it is perfect for trying and playing with new things.<\/p>\n<h2>Application structure<\/h2>\n<p>The application is a regular Spring Boot application, that one can bootstrapped with <a href=\"http:\/\/start.spring.io\">http:\/\/start.spring.io<\/a>. Build system used is Maven, packaging type is Jar. Tomcat 8 with Java 8 used. Spring Boot uses Tomcat 7 by default, to change it the following property was added:<\/p>\n<pre class=\" brush:xml\">&lt;properties&gt;\r\n    &lt;tomcat.version&gt;8.0.9&lt;\/tomcat.version&gt;\r\n&lt;\/properties&gt;<\/pre>\n<p>The Maven was selected, since currently only Gradle 1.6 can be used on OpenShift. This is due to a bug in <a href=\"https:\/\/issues.gradle.org\/browse\/GRADLE-2871\">Gradle<\/a>. Gradle 2.2 fixes this issue.<\/p>\n<h2>Maven settings.xml<\/h2>\n<p>The <code>settings.xml<\/code> file is pretty important, as it contains the location of Maven repository: <code>${OPENSHIFT_DATA_DIR}\/m2\/repository<\/code>.<\/p>\n<p>On OpenShift, write permissions are only in $OPENSHIFT_DATA_DIR.<\/p>\n<h2>Data source configuration<\/h2>\n<p>The application uses Spring Data REST to export repositories over REST. The required dependencies are:<\/p>\n<ul>\n<li>spring-boot-starter-data-jpa &#8211; repositories configuration<\/li>\n<li>spring-boot-starter-data-rest &#8211; exposing repositoties over REST<\/li>\n<li>hsqldb &#8211; for embedded database support<\/li>\n<li>postgresql &#8211; for PostgreSQL support. Since currently OpenShift uses PostgreSQL 9.2, the appropriate driver\u2019s version is used<\/li>\n<\/ul>\n<h3>Common properties &#8211; application.properties<\/h3>\n<p>By default (default profile, <code>src\/main\/resources\/application.properties<\/code>), the application will use embedded HSQLDB and populate it with the <code>src\/main\/resources\/data.sql<\/code>. The data file will work on both HSQLDB and PostrgeSQL, so we don\u2019t need to provide platform specific files (which is possible with Spring Boot).<\/p>\n<ul>\n<li><code>spring.datasource.initialize = true<\/code> must be used, so Spring Boot picks up the data file and loads it to the database.<\/li>\n<li><code>spring.jpa.generate-ddl = true<\/code> makes sure that the schema will be exported.<\/li>\n<\/ul>\n<h3>OpenShift properties &#8211; application-openshift.properties<\/h3>\n<p>OpenShift specific configuration (<code>src\/main\/resources\/application-openshift.properties<\/code>) allows the use of PostgreSQL service. The configuration uses OpenShift env variables to setup the connection properties:<\/p>\n<ul>\n<li>$OPENSHIFT_POSTGRESQL_DB_HOST &#8211; for the database host<\/li>\n<li>$OPENSHIFT_POSTGRESQL_DB_PORT &#8211; for the database port<\/li>\n<li>$OPENSHIFT_APP_NAME &#8211; for the database name<\/li>\n<li>$OPENSHIFT_POSTGRESQL_DB_USERNAME &#8211; for the database username<\/li>\n<li>$OPENSHIFT_POSTGRESQL_DB_PASSWORD &#8211; for the database password<\/li>\n<\/ul>\n<p>Spring allows to use env variables directly in properties with <code>${}<\/code> syntax, e.g.:<\/p>\n<pre class=\" brush:java\">spring.datasource.username = ${OPENSHIFT_POSTGRESQL_DB_USERNAME}<\/pre>\n<p>To let Spring Boot activate OpenShift profile, the <code>spring.profiles.active<\/code> property is passed to the application at startup: <code>java -jar &lt;name&gt;.jar --spring.profiles.active=openshift<\/code>.<\/p>\n<h2>Logging on OpenShift<\/h2>\n<p>The logging file will be stored in $OPENSHIFT_DATA_DIR:<\/p>\n<pre class=\" brush:java\">logging.file=${OPENSHIFT_DATA_DIR}\/logs\/app.log<\/pre>\n<h2>Actuator<\/h2>\n<p>Actuator default management context path is <code>\/<\/code>. This is changed to <code>\/manage<\/code>, because OpenShift exposes <code>\/health<\/code> endpoint itself that covers Actuator\u2019s <code>\/health<\/code> endpoint .<\/p>\n<pre class=\" brush:java\">management.context-path=\/manage<\/pre>\n<h2>OpenShift action_hooks<\/h2>\n<p>OpenShift executes action hooks script files at specific points during the deployment process. All hooks are placed in the <code>.openshift\/action_hooks<\/code> directory in the application repository. Files must have be executable. In Windows, in Git Bash, the following command can be used:<\/p>\n<pre class=\" brush:java\">git update-index --chmod=+x .openshift\/action_hooks\/*<\/pre>\n<h3>Deploying the application<\/h3>\n<p>The <code>deploy<\/code> script downloads Java and Maven, creates some directories and exports couple of environment variables required to properly run Java 8 \/ Maven build.<\/p>\n<p>The final command of the deployment is to run Maven goals:<\/p>\n<pre class=\" brush:java\">mvn -s settings.xml clean install<\/pre>\n<h3>Starting the application<\/h3>\n<p>When <code>deploy<\/code> script finishes successfully, the <code>target<\/code> directory will contain a single jar with the Spring Boot application assembled. The application is started and bound to the server address and port provided by OpenShift. In addition, the profile name is provided, so a valid data source will be created. The final command that runs the application:<\/p>\n<pre class=\" brush:java;wrap-lines:false\">nohup java -Xms384m -Xmx412m -jar target\/*.jar --server.port=${OPENSHIFT_DIY_PORT} --server.address=${OPENSHIFT_DIY_IP} --spring.profiles.active=openshift &amp;<\/pre>\n<h3>Stopping the application<\/h3>\n<p>The <code>stop<\/code> script is looking for a Java process and when it finds it\u2026 you know what happens.<\/p>\n<h2>Summary<\/h2>\n<p>I am pretty happy with the evaluation of OpenShift with Do It Yourself cartridge. Not everything went smooth as I expected, mostly due to memory limitations on small Gear. I spent some time to figure it out and have proper configuration. But still, OpenShift with DIY is worth trying and playing with for a short while. Especially, that to get started is completely for free.<\/p>\n<h2>References<\/h2>\n<ul>\n<li>The project source code, used throughout this article, can be found on GitHub: <a href=\"https:\/\/github.com\/kolorobot\/openshift-diy-spring-boot-sample\">https:\/\/github.com\/kolorobot\/openshift-diy-spring-boot-sample<\/a>.<\/li>\n<li>Spring Boot documentation: <a href=\"http:\/\/docs.spring.io\/spring-boot\/docs\/current\/reference\/htmlsingle\/#cloud-deployment-openshift\">http:\/\/docs.spring.io\/spring-boot\/docs\/current\/reference\/htmlsingle\/#cloud-deployment-openshift<\/a><\/li>\n<li>Some OpenShift references used while creating this article:<br \/>\n<a href=\"https:\/\/blog.openshift.com\/run-gradle-builds-on-openshift\">https:\/\/blog.openshift.com\/run-gradle-builds-on-openshift<\/a><br \/>\n<a href=\"https:\/\/blog.openshift.com\/tips-for-creating-openshift-apps-with-windows\">https:\/\/blog.openshift.com\/tips-for-creating-openshift-apps-with-windows<\/a><\/li>\n<\/ul>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/blog.codeleak.pl\/2014\/10\/spring-boot-java-8-tomcat-8-on-openshift.html\">Spring Boot \/ Java 8 \/ Tomcat 8 on Openshift with DIY<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/jcg\/\">JCG partner<\/a> Rafal Borowiec at the <a href=\"http:\/\/blog.codeleak.pl\/\">Codeleak.pl<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>DIY cartridge is an experimental cartridge that provides a way to test unsupported languages on OpenShift. It provides a minimal, free-form scaffolding which leaves all details of the cartridge to the application developer. This blog post illustrates the use of Spring Boot \/ Java 8 \/ Tomcat 8 application with PostgreSQL service bound to it. &hellip;<\/p>\n","protected":false},"author":516,"featured_media":84,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[32,196,30,854],"class_list":["post-31826","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-apache-tomcat","tag-java-8","tag-spring","tag-spring-boot"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spring Boot \/ Java 8 \/ Tomcat 8 on Openshift with DIY<\/title>\n<meta name=\"description\" content=\"DIY cartridge is an experimental cartridge that provides a way to test unsupported languages on OpenShift. It provides a minimal, free-form scaffolding\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2014\/10\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring Boot \/ Java 8 \/ Tomcat 8 on Openshift with DIY\" \/>\n<meta property=\"og:description\" content=\"DIY cartridge is an experimental cartridge that provides a way to test unsupported languages on OpenShift. It provides a minimal, free-form scaffolding\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2014\/10\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2014-10-26T13:00:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-tomcat-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=\"Rafal Borowiec\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/kolorobot\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rafal Borowiec\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/10\\\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/10\\\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html\"},\"author\":{\"name\":\"Rafal Borowiec\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/b1a0b2657d5dd2459806446ac66d2d52\"},\"headline\":\"Spring Boot \\\/ Java 8 \\\/ Tomcat 8 on Openshift with DIY\",\"datePublished\":\"2014-10-26T13:00:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/10\\\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html\"},\"wordCount\":1071,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/10\\\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-tomcat-logo.jpg\",\"keywords\":[\"Apache Tomcat\",\"Java 8\",\"Spring\",\"Spring Boot\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/10\\\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/10\\\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/10\\\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html\",\"name\":\"Spring Boot \\\/ Java 8 \\\/ Tomcat 8 on Openshift with DIY\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/10\\\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/10\\\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-tomcat-logo.jpg\",\"datePublished\":\"2014-10-26T13:00:35+00:00\",\"description\":\"DIY cartridge is an experimental cartridge that provides a way to test unsupported languages on OpenShift. It provides a minimal, free-form scaffolding\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/10\\\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/10\\\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/10\\\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-tomcat-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-tomcat-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/10\\\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Spring Boot \\\/ Java 8 \\\/ Tomcat 8 on Openshift with DIY\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/b1a0b2657d5dd2459806446ac66d2d52\",\"name\":\"Rafal Borowiec\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e24680b2ba3dfc13759acf6c1f125e54356bc533e0befe953fea365cadcdaffb?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e24680b2ba3dfc13759acf6c1f125e54356bc533e0befe953fea365cadcdaffb?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e24680b2ba3dfc13759acf6c1f125e54356bc533e0befe953fea365cadcdaffb?s=96&d=mm&r=g\",\"caption\":\"Rafal Borowiec\"},\"description\":\"Software developer, Team Leader, Agile practitioner, occasional blogger, lecturer. Open Source enthusiast, quality oriented and open-minded.\",\"sameAs\":[\"http:\\\/\\\/blog.codeleak.pl\\\/\",\"http:\\\/\\\/pl.linkedin.com\\\/in\\\/borowiec\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/kolorobot\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/rafal-borowiec\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spring Boot \/ Java 8 \/ Tomcat 8 on Openshift with DIY","description":"DIY cartridge is an experimental cartridge that provides a way to test unsupported languages on OpenShift. It provides a minimal, free-form scaffolding","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:\/\/www.javacodegeeks.com\/2014\/10\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html","og_locale":"en_US","og_type":"article","og_title":"Spring Boot \/ Java 8 \/ Tomcat 8 on Openshift with DIY","og_description":"DIY cartridge is an experimental cartridge that provides a way to test unsupported languages on OpenShift. It provides a minimal, free-form scaffolding","og_url":"https:\/\/www.javacodegeeks.com\/2014\/10\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2014-10-26T13:00:35+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-tomcat-logo.jpg","type":"image\/jpeg"}],"author":"Rafal Borowiec","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/kolorobot","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Rafal Borowiec","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2014\/10\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/10\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html"},"author":{"name":"Rafal Borowiec","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/b1a0b2657d5dd2459806446ac66d2d52"},"headline":"Spring Boot \/ Java 8 \/ Tomcat 8 on Openshift with DIY","datePublished":"2014-10-26T13:00:35+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/10\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html"},"wordCount":1071,"commentCount":3,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/10\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-tomcat-logo.jpg","keywords":["Apache Tomcat","Java 8","Spring","Spring Boot"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2014\/10\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2014\/10\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html","url":"https:\/\/www.javacodegeeks.com\/2014\/10\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html","name":"Spring Boot \/ Java 8 \/ Tomcat 8 on Openshift with DIY","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/10\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/10\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-tomcat-logo.jpg","datePublished":"2014-10-26T13:00:35+00:00","description":"DIY cartridge is an experimental cartridge that provides a way to test unsupported languages on OpenShift. It provides a minimal, free-form scaffolding","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/10\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2014\/10\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2014\/10\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-tomcat-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-tomcat-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2014\/10\/spring-boot-java-8-tomcat-8-on-openshift-with-diy.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Spring Boot \/ Java 8 \/ Tomcat 8 on Openshift with DIY"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/b1a0b2657d5dd2459806446ac66d2d52","name":"Rafal Borowiec","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e24680b2ba3dfc13759acf6c1f125e54356bc533e0befe953fea365cadcdaffb?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e24680b2ba3dfc13759acf6c1f125e54356bc533e0befe953fea365cadcdaffb?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e24680b2ba3dfc13759acf6c1f125e54356bc533e0befe953fea365cadcdaffb?s=96&d=mm&r=g","caption":"Rafal Borowiec"},"description":"Software developer, Team Leader, Agile practitioner, occasional blogger, lecturer. Open Source enthusiast, quality oriented and open-minded.","sameAs":["http:\/\/blog.codeleak.pl\/","http:\/\/pl.linkedin.com\/in\/borowiec\/","https:\/\/x.com\/https:\/\/twitter.com\/kolorobot"],"url":"https:\/\/www.javacodegeeks.com\/author\/rafal-borowiec"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/31826","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/516"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=31826"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/31826\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/84"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=31826"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=31826"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=31826"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}