1. Home
  2. Docs
  3. Local development with CodeNOW
  4. Java Spring Boot – Local Development

Java Spring Boot – Local Development

? 30 minutes 

What you’ll learn

How to set up your local development environment for:

  • Java Spring Boot component development. 
  • Run developed component in local development mode on your machine. 


Prepare local development IDE

  • Clone code from the created git repository to your local machine.
  • Use your favourite IDE and import repository as a maven project. You will require:
  • To run the project in the local development setup, check README.md. The required minimum is to set the path to Micronaut configuration file as a JVM startup parameter:
    • -Dspring.config.location=file:./config/application.yaml 
      • Check the Run configuration dialog in your IDE and set this line as a VM argument.
  • NOTE: You can also configure this server to listen on a custom port (the default port is 8080).
    • -Dserver.port=9090 
    • Comes in handy when running multiple projects at once, which is very common with micro-service oriented architecture.
  • Start Run/Debug in your IDE
    • The component should successfully start up with port 8080 exposed
    • Check swagger-ui clicking on http://localhost:8080/swagger/index.html
      • For more information about Swagger UI check: https://swagger.io/tools/swagger-ui/
      • Swagger UI is used as a simple swagger presentation UI
      • Any changes made in code are automatically propagated to swagger-ui (courtesy of SpringFox).
      • The same swagger UI is used as the documentation tool and is also an easy way to test the functionality of your component’s API.

Docker compose and third-party tools

Some manuals for CodeNOW work with different third-party components like Apache Kafka or Redis. The easiest way for local development is to download publicly available docker compose receipts. Some examples used during the writing of this manual:

Was this article helpful to you? Yes No