Today is Thursday, 25th April 2019

Archive for the ‘Uncategorized’ Category


How to Deploy Spring Boot and AWS Elastic Beanstalk

Overview of Steps

  • AWS EBS expects for your apps to listen on port 5000
  • Update your Spring Boot application.properties to use: server.port=5000
  • Select Web App > Platform Java
  • Upload the JAR file

Create basic Spring Boot app

  1. Start with a simple REST Spring Boot app.
  2. In application.properties, change port to 5000: server.port=5000
  3. Open terminal window
  4. cd project directory
  5. mvn clean package
  6. java -jar target/myapp.jar
  7. Test it locally: http://localhost:5000

Deploy on AWS

  1. Log into to AWS
  2. Navigate to Elastic Beanstalk
  3. Create a new application
  4. Select app type: Web Application
  5. Give it the name: simple-boot-demo
  6. Create a new environment
  7. For platform, select: Java
  8. Select option to Upload your JAR file.
    Note: the screen says only WAR and ZIP files, but it does in fact accept JAR files
  9. Upload your JAR file:  target/myapp.jar
  10. Create the application
  11. Once app is created, then visit the app URL.
  12. You will see your Spring Boot app up and running.


Advanced Servlets: Servlet Filters Tutorial

As a Java web developer, I recommend that you take advantage of an advanced servlet component: the Servlet Filter.
 
A Servlet filter is an object that can intercept HTTP requests targeted at your web application.
 
This article from journaldev.com does a good job of walking you through the development process. Enjoy!
 
Java Servlet Filters Tutorial
 


5 Reasons Why You Should Blog as a Software Developer

Did you know that blogging can help you get your next job and increase your profile?
 
Here’s a good article that provides more insight.
 
5 Reasons Why You Should Blog as a Software Developer
 
Enjoy!