{"id":1069,"date":"2021-07-23T15:10:45","date_gmt":"2021-07-23T22:10:45","guid":{"rendered":"https:\/\/bullyrooks.com\/?p=1069"},"modified":"2021-07-25T06:53:26","modified_gmt":"2021-07-25T13:53:26","slug":"spring-boot-lambda-implementation","status":"publish","type":"post","link":"https:\/\/bullyrooks.com\/index.php\/2021\/07\/23\/spring-boot-lambda-implementation\/","title":{"rendered":"Spring Boot Lambda Implementation"},"content":{"rendered":"\n<p>Now we&#8217;re going to add some code.  I&#8217;m going to follow my ports and adapters method of building a DTO and value object that <a href=\"https:\/\/bullyrooks.com\/index.php\/2020\/03\/30\/simple-spring-boot-service-to-kubernetes-application-step-3-f03bdfe30ceb\/\" data-type=\"post\" data-id=\"819\">I&#8217;ve used previously<\/a>.  Yes, its a bit of overkill for this project (especially a hello world example), but if you&#8217;re using this course as a springboard to build another project, I think its a good habit to get into.  Especially since lambda functional code supplied by spring introduces some code you may not want in your service layer.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Build the Service Layer<\/h2>\n\n\n\n<p>create a class in a new <code>service<\/code> package for the service:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package com.bullyrooks.helloworldlambda.service;\n\nimport com.bullyrooks.helloworldlambda.service.vo.HelloWorld;\nimport org.springframework.stereotype.Component;\n\n@Component\npublic class HelloWorldService {\n\n    public HelloWorld helloWorld(String name) {\n        return HelloWorld.builder()\n                .response(\"Hello, \" + name)\n                .build();\n    }\n}\n<\/code><\/pre>\n\n\n\n<p>Create a new value object to handle the response in a new package <code>service\/vo<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package com.bullyrooks.helloworldlambda.service.vo;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Builder;\nimport lombok.Data;\nimport lombok.NoArgsConstructor;\n\n@Data\n@AllArgsConstructor\n@NoArgsConstructor\n@Builder\npublic class HelloWorld {\n    private String response;\n}\n<\/code><\/pre>\n\n\n\n<p>We&#8217;ll need to import some libraries to support the function features, so add these libraries to your <code>pom.xml<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\t&lt;parent>\r\n\t\t&lt;groupId>org.springframework.boot&lt;\/groupId>\r\n\t\t&lt;artifactId>spring-boot-starter-parent&lt;\/artifactId>\r\n\t\t<span class=\"has-inline-color has-vivid-red-color\">&lt;version>2.4.5&lt;\/version><\/span>\r\n\t\t&lt;relativePath\/> &lt;!-- lookup parent from repository -->\r\n\t&lt;\/parent>\n...\n\t&lt;properties>\r\n\t\t&lt;java.version>11&lt;\/java.version>\r\n\t\t<span class=\"has-inline-color has-vivid-red-color\">&lt;aws-lambda-java-events.version>3.1.0&lt;\/aws-lambda-java-events.version>\r\n\t\t&lt;aws-lambda-java-core.version>1.2.0&lt;\/aws-lambda-java-core.version>\r\n\t\t&lt;spring-cloud.version>Hoxton.SR6&lt;\/spring-cloud.version>\r\n\t\t&lt;wrapper.version>1.0.11.RELEASE&lt;\/wrapper.version><\/span>\r\n\t&lt;\/properties>\n\n...\n\n<span class=\"has-inline-color has-vivid-red-color\">\t&lt;dependencyManagement>\r\n\t\t&lt;dependencies>\r\n\t\t\t&lt;dependency>\r\n\t\t\t\t&lt;groupId>org.springframework.cloud&lt;\/groupId>\r\n\t\t\t\t&lt;artifactId>spring-cloud-dependencies&lt;\/artifactId>\r\n\t\t\t\t&lt;version>${spring-cloud.version}&lt;\/version>\r\n\t\t\t\t&lt;type>pom&lt;\/type>\r\n\t\t\t\t&lt;scope>import&lt;\/scope>\r\n\t\t\t&lt;\/dependency>\r\n\t\t&lt;\/dependencies>\r\n\t&lt;\/dependencyManagement><\/span>\r\n\n...\n\n<span class=\"has-inline-color has-vivid-red-color\">\t\t&lt;dependency>\r\n\t\t\t&lt;groupId>org.springframework.cloud&lt;\/groupId>\r\n\t\t\t&lt;artifactId>spring-cloud-function-adapter-aws&lt;\/artifactId>\r\n\t\t&lt;\/dependency>\r\n\t\t&lt;dependency>\r\n\t\t\t&lt;groupId>com.amazonaws&lt;\/groupId>\r\n\t\t\t&lt;artifactId>aws-lambda-java-events&lt;\/artifactId>\r\n\t\t\t&lt;version>${aws-lambda-java-events.version}&lt;\/version>\r\n\t\t&lt;\/dependency>\r\n\t\t&lt;dependency>\r\n\t\t\t&lt;groupId>com.amazonaws&lt;\/groupId>\r\n\t\t\t&lt;artifactId>aws-lambda-java-core&lt;\/artifactId>\r\n\t\t\t&lt;version>${aws-lambda-java-core.version}&lt;\/version>\r\n\t\t&lt;\/dependency><\/span>\n\n\n...\n\n\n\t\t\t<span class=\"has-inline-color has-vivid-red-color\">&lt;plugin>\r\n\t\t\t\t&lt;groupId>org.apache.maven.plugins&lt;\/groupId>\r\n\t\t\t\t&lt;artifactId>maven-jar-plugin&lt;\/artifactId>\r\n\t\t\t\t&lt;version>3.2.0&lt;\/version>\r\n\r\n\t\t\t\t&lt;configuration>\r\n\t\t\t\t\t&lt;archive>\r\n\t\t\t\t\t\t&lt;manifest>\r\n\t\t\t\t\t\t\t&lt;mainClass>com.bullyrooks.helloworldlambda.HelloworldLambdaApplication&lt;\/mainClass>\r\n\t\t\t\t\t\t&lt;\/manifest>\r\n\t\t\t\t\t&lt;\/archive>\r\n\t\t\t\t&lt;\/configuration>\r\n\t\t\t&lt;\/plugin>\r\n\t\t\t&lt;plugin>\r\n\t\t\t\t&lt;groupId>org.apache.maven.plugins&lt;\/groupId>\r\n\t\t\t\t&lt;artifactId>maven-deploy-plugin&lt;\/artifactId>\r\n\t\t\t\t&lt;configuration>\r\n\t\t\t\t\t&lt;skip>true&lt;\/skip>\r\n\t\t\t\t&lt;\/configuration>\r\n\t\t\t&lt;\/plugin>\r\n\t\t\t&lt;plugin>\r\n\t\t\t\t&lt;groupId>org.springframework.boot&lt;\/groupId>\r\n\t\t\t\t&lt;artifactId>spring-boot-maven-plugin&lt;\/artifactId>\r\n\t\t\t\t&lt;dependencies>\r\n\t\t\t\t\t&lt;dependency>\r\n\t\t\t\t\t\t&lt;groupId>org.springframework.boot.experimental&lt;\/groupId>\r\n\t\t\t\t\t\t&lt;artifactId>spring-boot-thin-layout&lt;\/artifactId>\r\n\t\t\t\t\t\t&lt;version>${wrapper.version}&lt;\/version>\r\n\t\t\t\t\t&lt;\/dependency>\r\n\t\t\t\t&lt;\/dependencies>\r\n\t\t\t&lt;\/plugin>\r\n\t\t\t&lt;plugin>\r\n\t\t\t\t&lt;groupId>org.apache.maven.plugins&lt;\/groupId>\r\n\t\t\t\t&lt;artifactId>maven-shade-plugin&lt;\/artifactId>\r\n\t\t\t\t&lt;version>3.2.4&lt;\/version>\r\n\t\t\t\t&lt;configuration>\r\n\t\t\t\t\t&lt;createDependencyReducedPom>false&lt;\/createDependencyReducedPom>\r\n\t\t\t\t\t&lt;shadedArtifactAttached>true&lt;\/shadedArtifactAttached>\r\n\t\t\t\t\t&lt;shadedClassifierName>aws&lt;\/shadedClassifierName>\r\n\t\t\t\t&lt;\/configuration>\r\n\t\t\t\t&lt;executions>\r\n\t\t\t\t\t&lt;execution>\r\n\t\t\t\t\t\t&lt;phase>package&lt;\/phase>\r\n\t\t\t\t\t\t&lt;goals>\r\n\t\t\t\t\t\t\t&lt;goal>shade&lt;\/goal>\r\n\t\t\t\t\t\t&lt;\/goals>\r\n\t\t\t\t\t&lt;\/execution>\r\n\t\t\t\t&lt;\/executions>\r\n\t\t\t&lt;\/plugin>\r\n\t\t&lt;\/plugins>\r\n\t\t&lt;finalName>${project.name}&lt;\/finalName><\/span>\r\n<span class=\"has-inline-color has-vivid-red-color\">\r\n<\/span><\/code><\/pre>\n\n\n\n<p>First off, I&#8217;m downgrading the version of spring boot parent.  I <em>thought<\/em> I had some trouble with java 11, the spring boot parent and the version of the spring cloud that I was bringing in and this combination worked.  Second, I&#8217;m setting up the properties for the versions of the dependencies I&#8217;m bringing in.  Next, setting up spring cloud dependency management because I have one spring cloud dependency.  Also, adding a bunch of new dependencies.  <\/p>\n\n\n\n<p>The plugins need more explanation: <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>maven jar plugin is identifying the spring boot application class so that the command line startup can find it quickly<\/li><li>spring boot maven is adding a thin layout to try and keep the size of the jar down<\/li><li>maven shade plugin identifies our dependencies and pulls them into an uber jar which allows the .jar to operate without any jars on (external) classpath<\/li><\/ul>\n\n\n\n<p>We&#8217;re going to want uber jars (that contain all of their dependencies) that are very small (because this helps with keeping storage costs down and improves transfer speeds).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Add the Function<\/h2>\n\n\n\n<p>First, create a new package <code>function<\/code> and add this class:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@Component\r\npublic class HelloWorldFunction implements Function&lt;String, String> {\r\n\r\n    @Autowired\r\n    HelloWorldService helloWorldService;\r\n\r\n    @Override\r\n    public String apply(String input) {\r\n        return helloWorldService.helloWorld(input).getResponse();\r\n    }\r\n}<\/code><\/pre>\n\n\n\n<p>That&#8217;s all you need.  We&#8217;re going to use some spring magic to wire this up.  But first, rebuild so we can deploy<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ mvn clean package\n...\n&#91;INFO] ------------------------------------------------------------------------\r\n&#91;INFO] BUILD SUCCESS\r\n&#91;INFO] ------------------------------------------------------------------------\r\n&#91;INFO] Total time:  8.505 s\r\n&#91;INFO] Finished at: \r\n&#91;INFO] ------------------------------------------------------------------------\r\n\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Create the Lambda<\/h2>\n\n\n\n<p>Now log into aws console and navigate to the <code>Lambda<\/code> section<\/p>\n\n\n\n<p>Click Create Function<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"105\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-2-1024x112.png?resize=960%2C105&#038;ssl=1\" alt=\"\" class=\"wp-image-1072\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-2.png?resize=1024%2C112&amp;ssl=1 1024w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-2.png?resize=300%2C33&amp;ssl=1 300w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-2.png?resize=768%2C84&amp;ssl=1 768w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-2.png?w=1481&amp;ssl=1 1481w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>Choose <code>Author from scratch<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"728\" height=\"191\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-3.png?resize=728%2C191&#038;ssl=1\" alt=\"\" class=\"wp-image-1073\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-3.png?w=728&amp;ssl=1 728w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-3.png?resize=300%2C79&amp;ssl=1 300w\" sizes=\"auto, (max-width: 728px) 100vw, 728px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>Name the lambda and choose the java 11 runtime<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"707\" height=\"569\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-4.png?resize=707%2C569&#038;ssl=1\" alt=\"\" class=\"wp-image-1074\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-4.png?w=707&amp;ssl=1 707w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-4.png?resize=300%2C241&amp;ssl=1 300w\" sizes=\"auto, (max-width: 707px) 100vw, 707px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>In code source, click upload from<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"177\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-5.png?resize=710%2C177&#038;ssl=1\" alt=\"\" class=\"wp-image-1075\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-5.png?w=710&amp;ssl=1 710w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-5.png?resize=300%2C75&amp;ssl=1 300w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>Choose the <strong><code>helloworld-lambda-0.0.1-SNAPSHOT-aws.jar<\/code><\/strong> which is the shaded uber jar (which has also been slimmed down).<\/p>\n\n\n\n<p>Edit the runtime settings to use the built in aws function invoker<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"699\" height=\"165\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-6.png?resize=699%2C165&#038;ssl=1\" alt=\"\" class=\"wp-image-1076\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-6.png?w=699&amp;ssl=1 699w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-6.png?resize=300%2C71&amp;ssl=1 300w\" sizes=\"auto, (max-width: 699px) 100vw, 699px\" data-recalc-dims=\"1\" \/><figcaption>Use the <code>org.springframework.cloud.function.adapter.aws.FunctionInvoker::handleRequest<\/code> handler<\/figcaption><\/figure>\n\n\n\n<p>Finally, go to the configuration tab, select environment variables and add an environment variable  for a key of <code>FUNCTION_NAME<\/code> and a value of your function class <code>HelloWorldFunction<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"601\" height=\"260\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-7.png?resize=601%2C260&#038;ssl=1\" alt=\"\" class=\"wp-image-1077\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-7.png?w=601&amp;ssl=1 601w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-7.png?resize=300%2C130&amp;ssl=1 300w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Test the Lambda<\/h2>\n\n\n\n<p>Go to the <code>Test<\/code> tab, use the hello-world template and add a test that looks like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"676\" height=\"314\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-8.png?resize=676%2C314&#038;ssl=1\" alt=\"\" class=\"wp-image-1078\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-8.png?w=676&amp;ssl=1 676w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-8.png?resize=300%2C139&amp;ssl=1 300w\" sizes=\"auto, (max-width: 676px) 100vw, 676px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>and hit test.  You should see a succeeded output:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"688\" height=\"170\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-9.png?resize=688%2C170&#038;ssl=1\" alt=\"\" class=\"wp-image-1079\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-9.png?w=688&amp;ssl=1 688w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-9.png?resize=300%2C74&amp;ssl=1 300w\" sizes=\"auto, (max-width: 688px) 100vw, 688px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Commit and Finish<\/h2>\n\n\n\n<p>We&#8217;ve got a working lambda!  Its not very useful at this point though.  We&#8217;ll add an API to it next.<\/p>\n\n\n\n<p>Let&#8217;s commit and merge.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span class=\"has-inline-color has-vivid-red-color\">$ git status<\/span>\r\nOn branch function\r\nYour branch is up to date with 'origin\/function'.\r\n\r\nChanges not staged for commit:\r\n  (use \"git add &lt;file>...\" to update what will be committed)\r\n  (use \"git restore &lt;file>...\" to discard changes in working directory)\r\n        modified:   pom.xml\r\n        modified:   src\/main\/java\/com\/bullyrooks\/helloworldlambda\/HelloworldLambdaApplication.java\r\n\r\nUntracked files:\r\n  (use \"git add &lt;file>...\" to include in what will be committed)\r\n        src\/main\/java\/com\/bullyrooks\/helloworldlambda\/function\/\r\n\r\nno changes added to commit (use \"git add\" and\/or \"git commit -a\")\n\n<span class=\"has-inline-color has-vivid-red-color\">$ git add .<\/span>\n\n<span class=\"has-inline-color has-vivid-red-color\">$ git commit -m \"working lambda\"<\/span>\r\n&#91;function ced0de0] working lambda\r\n 3 files changed, 144 insertions(+), 86 deletions(-)\r\n rewrite pom.xml (97%)\r\n create mode 100644 src\/main\/java\/com\/bullyrooks\/helloworldlambda\/function\/HelloWorldFunction.java\r\n\n\n<span class=\"has-inline-color has-vivid-red-color\">$ git push<\/span>\r\nLogon failed, use ctrl+c to cancel basic credential prompt.\r\nUsername for 'https:\/\/github.com': bullyrooks\r\nPassword for 'https:\/\/bullyrooks@github.com':\r\nEnumerating objects: 21, done.\r\nCounting objects: 100% (21\/21), done.\r\nDelta compression using up to 4 threads\r\nCompressing objects: 100% (9\/9), done.\r\nWriting objects: 100% (12\/12), 2.12 KiB | 2.12 MiB\/s, done.\r\nTotal 12 (delta 2), reused 0 (delta 0), pack-reused 0\r\nremote: Resolving deltas: 100% (2\/2), completed with 2 local objects.\r\nTo https:\/\/github.com\/bullyrooks\/helloworld-lambda.git\r\n   0420e4f..ced0de0  function -> function\r\n\n<span class=\"has-inline-color has-vivid-red-color\">$ git checkout main<\/span>\n\r\n<span class=\"has-inline-color has-vivid-red-color\">$ git merge function<\/span>\n\n<span class=\"has-inline-color has-vivid-red-color\">$ git push<\/span>\n<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"entry-summary\">\nNow we&#8217;re going to add some code. I&#8217;m going to follow my&hellip;\n<\/div>\n<div class=\"link-more\"><a href=\"https:\/\/bullyrooks.com\/index.php\/2021\/07\/23\/spring-boot-lambda-implementation\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &ldquo;Spring Boot Lambda Implementation&rdquo;<\/span>&hellip;<\/a><\/div>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[142,144,143,50,42,43],"course":[141],"class_list":["post-1069","post","type-post","status-publish","format-standard","hentry","category-software-development","tag-aws","tag-java","tag-lambda","tag-maven","tag-spring","tag-spring-boot","course-spring-boot-lambda-on-aws","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":1081,"url":"https:\/\/bullyrooks.com\/index.php\/2021\/07\/24\/spring-boot-lambda-api-implementation\/","url_meta":{"origin":1069,"position":0},"title":"Spring Boot Lambda API Implementation","author":"Bullyrook","date":"July 24, 2021","format":false,"excerpt":"We've got a 'working' lambda now, but we can't actually use it anywhere. The easiest thing to do at this point is add an API Gateway trigger to our function as a new lambda. This will require a little bit of work to make an API Gateway adapter to our\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-10.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-10.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-10.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":1133,"url":"https:\/\/bullyrooks.com\/index.php\/2021\/07\/25\/confirming-the-continuous-deployment-pipeline\/","url_meta":{"origin":1069,"position":1},"title":"Confirming the Continuous Deployment Pipeline","author":"Bullyrook","date":"July 25, 2021","format":false,"excerpt":"Lets verify that changes to our application will be automatically available when they're pushed up. Update the Application Let's start a new branch $ git checkout -b \"greeting-change\" Now update our service to return a different greeting: @Component public class HelloWorldService { public HelloWorld helloWorld(String name) { return HelloWorld.builder() .response(\"G'Day,\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-48.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-48.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-48.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-48.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":1065,"url":"https:\/\/bullyrooks.com\/index.php\/2021\/07\/23\/spring-boot-lambda-prerequisites\/","url_meta":{"origin":1069,"position":2},"title":"Spring Boot Lambda Prerequisites","author":"Bullyrook","date":"July 23, 2021","format":false,"excerpt":"In this course we're going to build a very simple spring boot lambda, deploy it manually to AWS to make sure that it works and then automate the deployment using Terraform and github actions. This will allow us to automatically build and deploy changes from a commit to the main\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":1115,"url":"https:\/\/bullyrooks.com\/index.php\/2021\/07\/24\/automated-terraform-deploy-using-github-actions\/","url_meta":{"origin":1069,"position":3},"title":"Automated Terraform Deploy Using Github Actions","author":"Bullyrook","date":"July 24, 2021","format":false,"excerpt":"Now we just need to build and deploy our application automatically so that whenever we push changes to the main branch, they'll automatically become available through our endpoint. Create Our Artifact Storage We're going to use a 'poor man's artifactory' to store our compiled .jar files. With our current build\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-34.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":819,"url":"https:\/\/bullyrooks.com\/index.php\/2020\/03\/30\/simple-spring-boot-service-to-kubernetes-application-step-3-f03bdfe30ceb\/","url_meta":{"origin":1069,"position":4},"title":"Building a Service Layer","author":"Bullyrook","date":"March 30, 2020","format":false,"excerpt":"In this stage we\u2019re going to build out the service or logical layer of our microservice. I\u2019ll explain adapter and port or hexagonal architecture and covering the usage of mapstruct. Service Design Ports and adapter or hexagonal design is a well discussed concept, so I\u2019m not going to go into\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1102,"url":"https:\/\/bullyrooks.com\/index.php\/2021\/07\/24\/terraform-centralized-state-management\/","url_meta":{"origin":1069,"position":5},"title":"Terraform Centralized State Management","author":"Bullyrook","date":"July 24, 2021","format":false,"excerpt":"As we saw in the last course Terraform will manage the state of your application, but by default it stores this locally. This is not ideal for us and will cause problems when we try to work with others or create a continuous deployment pipeline. Now we'll create a way\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-23.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-23.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-23.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-23.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image-23.png?resize=1400%2C800&ssl=1 4x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts\/1069","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/comments?post=1069"}],"version-history":[{"count":2,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts\/1069\/revisions"}],"predecessor-version":[{"id":1080,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts\/1069\/revisions\/1080"}],"wp:attachment":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/media?parent=1069"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/categories?post=1069"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/tags?post=1069"},{"taxonomy":"course","embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/course?post=1069"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}