Skip to content

architect-templates/springboot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Architect Logo

A dynamic microservices framework for building, connecting, and deploying cloud-native applications.


Spring Boot Starter Project

Spring Boot is a popular Java framework for building web applications. This project is an example application bootstrapped with Spring Initializr and packaged into an Architect component.

This starter application will show how easy it is to deploy an application both locally and in a remote environment.

Pre-reqs

Clone the repo

To use this project, you can clone this repo yourself or use the architect init command.

Use architect init

You can use the architect init command to clone this repo locally. A drop-down list of Starter Projects is displayed for you to select from.

% architect init
? What is the name of your project? my-starter-project
? Please select a framework/language for your project Springboot

######################################
##### Let's set up your project! #####
######################################

Creating project directory... ✓
Pulling down GitHub repository... ✓ springboot

Successfully created project my-starter-project.

Your project is ready to be deployed by Architect!
To deploy locally, run:
	architect dev my-starter-project/architect.yml
$ architect init springboot
$ cd ./springboot

Clone it yourself

Run the following command to clone the repo yourself:

# Clone the repository and navigate to this directory
$ git clone [email protected]:architect-templates/springboot.git
$ cd ./springboot

Run Locally

Once the repo has been cloned to your local machine, execute the following command from the springboot directory to run it locally:

$ architect dev .

When this command completes, you can reach your new application by going to https://app.localhost.architect.sh.

Make your own changes

This application's architect.yml file contains a debug block that enables reloading for each service within the component. That means you can make changes to the source code and those changes will be applied to the running environment. This allows you to quickly iterate and see your changes without having to restart the application stack.

Give it a try! Search inside your project for "Favorite Movies" and change this string to “Favorite Pizzas”. Once you save the file, run docker exec architect-springboot--app-1 /bin/sh -c "mvn compile" in a terminal. This Apache Maven command will recompile the application. Refresh the browser to see your changes.

Deploy to the Cloud

Want to try deploying this application to a cloud environment? Architect's got you covered there, too! We offer free preview environments in our community cloud where you can deploy your applications before deploying to staging or prod. This is a great opportunity for testing and getting early feedback before merging your code. In fact, you can configure your GitOps to automatically deploy every PR to Architect's community cloud.

Create an environment

To create a new environment on Architect's free cloud, run the following command:

architect environments:create my-first-environment

This command presents you with a list of Kubernetes clusters. Since you haven't added any external clusters to your account, you should only see architect. Hit enter to create your environment on Architect's community cloud.

? Select a cluster (Use arrow keys or type to search)
❯  architect

When the command completes, you should see output similar to the following:

% architect environments:create my-first-environment
? Select a cluster architect
Registering environment with Architect... done
Environment created: https://cloud.architect.io/<account-name>/environments/my-first-environment

Deploy your component

You are now ready to deploy your component to your environment in Architect's community cloud. To deploy your component, run the following command from the springboot directory:

architect deploy architect.yml --account <account-name> --environment my-first-environment

Congrats! You've deployed your first component using Architect.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •