[JAVA] Create Spring Boot development environment on Vagrant


Normally Spring Boot comes with Tomcat, and Java itself runs on the JVM, so you can work locally, but I created an environment on Vagrant to operate another tool from Java.


OpenJDK 11 Maven 3.6.3 CentOS 7


yum update -y nss curl libcurl  //Update because it is old

touch /etc/yum.repos.d/adoptopenjdk.repo
echo [AdoptOpenJDK] >> /etc/yum.repos.d/adoptopenjdk.repo
echo name=AdoptOpenJDK >> /etc/yum.repos.d/adoptopenjdk.repo
echo baseurl=https://adoptopenjdk.jfrog.io/adoptopenjdk/rpm/centos/7/x86_64 >> /etc/yum.repos.d/adoptopenjdk.repo
echo enabled=1 >> /etc/yum.repos.d/adoptopenjdk.repo
echo gpgcheck=1 >> /etc/yum.repos.d/adoptopenjdk.repo
echo gpgkey=https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public >> /etc/yum.repos.d/adoptopenjdk.repo
yum -y install adoptopenjdk-11-openj9.x86_64
java -version


wget http://ftp.yz.yamagata-u.ac.jp/pub/network/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
tar xf apache-maven-3.6.3-bin.tar.gz -C /opt
ln -s /opt/apache-maven-3.6.3/ /opt/maven
touch /etc/profile.d/maven.sh
echo "export JAVA_HOME=/usr/lib/jvm/adoptopenjdk-11-openj9" >> /etc/profile.d/maven.sh
echo "export M2_HOME=/opt/maven" >> /etc/profile.d/maven.sh
echo "export MAVEN_HOME=/opt/maven" >> /etc/profile.d/maven.sh
echo 'export PATH=${M2_HOME}/bin:${PATH}' >> /etc/profile.d/maven.sh
rm apache-maven-3.6.3-bin.tar.gz


$ mvn spring-boot:run


If I mounted the source on Vagrant with rsync and installed Spring Boot Devtools, I could do hot reload, so I could move it comfortably.



Recommended Posts

Create Spring Boot development environment on Vagrant
Create a Spring Boot development environment with docker
Spring Boot environment construction memo on mac
Create Spring Boot-gradle-mysql development environment with Docker
Spring Boot + Docker Java development environment construction
I tried to create a Spring MVC development environment on Mac
Spring boot development-development environment-
Create Spring Boot environment with Windows + VS Code
[Spring Boot] Environment construction (macOS)
Create a Java development environment using jenv on Mac
Spring Boot on Microsoft Azure
Let's create a gcloud development environment on a centos8 container
Docker × Spring Boot environment construction
Try Spring Boot on Mac
Create microservices with Spring Boot
Spring Boot application development in Eclipse
◆ Spring Boot + gradle environment construction memo
gRPC on Spring Boot with grpc-spring-boot-starter
Create an app with Spring Boot 2
Hot deploy with Spring Boot development
Create an app with Spring Boot
Try running Spring Boot on Kubernetes
Build Unity development environment on docker
Install Java development environment on Mac
Create a development environment for Ruby 3.0.0 and Rails 6.1.0 on Ubuntu 20.04.1 LTS
Steps to build a Ruby on Rails development environment with Vagrant
Java development environment construction memo on Mac
Create Java Spring Boot project in IntelliJ
Let's create a Java development environment (updating)
Start web application development with Spring Boot
[Ruby] Building a Ruby development environment on Ubuntu
Build a Java development environment on Mac
Build Java 8 development environment on AWS Cloud9
Try Spring Boot 1 (Environment construction ~ Tomcat startup)
Run jooby's Eclipse development environment on Gradle
Build an Ultra96v2 development environment on Docker 1
Create a Spring Boot app development project with the cURL + tar command
I tried migrating the portfolio created on Vagrant to the Docker development environment
Introduction to Java development environment & Spring Boot application created with VS Code
Spring Boot environment construction with Docker (January 2021 version)
Create a website with Spring Boot + Gradle (jdk1.8.x)
About designing Spring Boot and unit test environment
Create a simple search app with Spring Boot
[Java] Build Java development environment on Ubuntu & check execution
Create a Spring Boot application using IntelliJ IDEA
Build Apache / Tomcat development environment on Cent OS 7
Challenge Spring Boot
Java development environment
Build Spring Boot project by environment with Gradle
Create CRUD apps with Spring Boot 2 + Thymeleaf + MyBatis
Rails6.0 ~ How to create an eco-friendly development environment
Create your own Utility with Thymeleaf with Spring Boot
Spring Boot Form
Build a development environment to create Ruby on Jets + React apps with Docker
Ruby on Rails development environment construction on M1 Mac
[Spring] Environment construction
Spring Boot Memorandum
Deploy a Spring Boot application on Elastic Beanstalk
gae + spring boot
Create a web api server with spring boot
GitLab development environment setup (GDK) on macOS (September 2020)