mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-18 05:25:50 +00:00
Changes welcome text in homepage by editing messages.properties
This commit is contained in:
parent
332abbcb8a
commit
3281d072f7
14 changed files with 105 additions and 7 deletions
28
.github/workflows/gradle-build.yml
vendored
28
.github/workflows/gradle-build.yml
vendored
|
@ -11,11 +11,10 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
java: [ '17' ]
|
java: ["17"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -23,9 +22,32 @@ jobs:
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
java-version: ${{matrix.java}}
|
java-version: ${{matrix.java}}
|
||||||
distribution: 'adopt'
|
distribution: "adopt"
|
||||||
cache: maven
|
cache: maven
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v4
|
uses: gradle/actions/setup-gradle@v4
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
|
|
||||||
|
# Below are added codes
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Set up JDK
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
java-version: "17"
|
||||||
|
distribution: "adopt"
|
||||||
|
- name: Run tests
|
||||||
|
run: ./gradlew test
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
runs-on: self-hosted # Use your own machine for deploying
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Deploy to Vagrant VM
|
||||||
|
run: |
|
||||||
|
vagrant up --provision
|
||||||
|
|
1
.vagrant/machines/default/virtualbox/action_provision
Normal file
1
.vagrant/machines/default/virtualbox/action_provision
Normal file
|
@ -0,0 +1 @@
|
||||||
|
1.5:558bbbdc-672d-4236-b18d-0747cd5fbeaf
|
1
.vagrant/machines/default/virtualbox/action_set_name
Normal file
1
.vagrant/machines/default/virtualbox/action_set_name
Normal file
|
@ -0,0 +1 @@
|
||||||
|
1745624815
|
1
.vagrant/machines/default/virtualbox/box_meta
Normal file
1
.vagrant/machines/default/virtualbox/box_meta
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"name":"ubuntu/bionic64","version":"20230607.0.5","provider":"virtualbox","directory":"boxes/ubuntu-VAGRANTSLASH-bionic64/20230607.0.5/virtualbox"}
|
1
.vagrant/machines/default/virtualbox/creator_uid
Normal file
1
.vagrant/machines/default/virtualbox/creator_uid
Normal file
|
@ -0,0 +1 @@
|
||||||
|
0
|
1
.vagrant/machines/default/virtualbox/id
Normal file
1
.vagrant/machines/default/virtualbox/id
Normal file
|
@ -0,0 +1 @@
|
||||||
|
558bbbdc-672d-4236-b18d-0747cd5fbeaf
|
1
.vagrant/machines/default/virtualbox/index_uuid
Normal file
1
.vagrant/machines/default/virtualbox/index_uuid
Normal file
|
@ -0,0 +1 @@
|
||||||
|
400cd81ad83347cf828ce0bd43022163
|
8
.vagrant/machines/default/virtualbox/private_key
Normal file
8
.vagrant/machines/default/virtualbox/private_key
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||||
|
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAA
|
||||||
|
AAtzc2gtZWQyNTUxOQAAACBNkoyert5NF60C2rjOy+AILyPoPkGR2q4Fc/Om
|
||||||
|
nfAeXQAAAJCq/MI+qvzCPgAAAAtzc2gtZWQyNTUxOQAAACBNkoyert5NF60C
|
||||||
|
2rjOy+AILyPoPkGR2q4Fc/OmnfAeXQAAAED6zsQ7eTXA+yBDkw3/0A65h6q3
|
||||||
|
y/LQartCCPYFBb+vC02SjJ6u3k0XrQLauM7L4AgvI+g+QZHargVz86ad8B5d
|
||||||
|
AAAAB3ZhZ3JhbnQBAgMEBQY=
|
||||||
|
-----END OPENSSH PRIVATE KEY-----
|
1
.vagrant/machines/default/virtualbox/synced_folders
Normal file
1
.vagrant/machines/default/virtualbox/synced_folders
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"virtualbox":{"/vagrant":{"guestpath":"/vagrant","hostpath":"C:/Users/HP/SCC Practical/spring-petclinic","disabled":false,"__vagrantfile":true}}}
|
1
.vagrant/machines/default/virtualbox/vagrant_cwd
Normal file
1
.vagrant/machines/default/virtualbox/vagrant_cwd
Normal file
|
@ -0,0 +1 @@
|
||||||
|
C:/Users/HP/SCC Practical/spring-petclinic
|
12
.vagrant/rgloader/loader.rb
Normal file
12
.vagrant/rgloader/loader.rb
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# Copyright (c) HashiCorp, Inc.
|
||||||
|
# SPDX-License-Identifier: BUSL-1.1
|
||||||
|
|
||||||
|
# This file loads the proper rgloader/loader.rb file that comes packaged
|
||||||
|
# with Vagrant so that encoded files can properly run with Vagrant.
|
||||||
|
|
||||||
|
if ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"]
|
||||||
|
require File.expand_path(
|
||||||
|
"rgloader/loader", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"])
|
||||||
|
else
|
||||||
|
raise "Encoded files can't be read outside of the Vagrant installer."
|
||||||
|
end
|
48
Vagrantfile
vendored
Normal file
48
Vagrantfile
vendored
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
Vagrant.configure("2") do |config|
|
||||||
|
# Use the ubuntu/bionic64 box
|
||||||
|
config.vm.box = "ubuntu/bionic64"
|
||||||
|
config.vm.boot_timeout = 600000
|
||||||
|
|
||||||
|
# Configuring VirtualBox provider settings
|
||||||
|
config.vm.provider "virtualbox" do |vb|
|
||||||
|
vb.name = "MyVB"
|
||||||
|
vb.cpus = 2
|
||||||
|
vb.memory = "2048"
|
||||||
|
end
|
||||||
|
|
||||||
|
# Configuring VirtualBox network settings
|
||||||
|
config.vm.network "forwarded_port", guest: 8080, host: 8086
|
||||||
|
|
||||||
|
# Configuring VirtualBox folder settings
|
||||||
|
config.vm.synced_folder ".", "/home/vagrant/petclinic"
|
||||||
|
|
||||||
|
# Provisioning with a shell script to run the JAR file
|
||||||
|
config.vm.provision "shell", inline: <<-SHELL
|
||||||
|
apt update
|
||||||
|
apt install -y openjdk-17-jdk git unzip
|
||||||
|
|
||||||
|
APP_DIR="/home/vagrant/petclinic"
|
||||||
|
REPO_URL="https://github.com/yiting68/spring-petclinic.git"
|
||||||
|
JAR_NAME="spring-petclinic-3.4.0.jar"
|
||||||
|
SERVICE_NAME="petclinic"
|
||||||
|
|
||||||
|
# Clone Spring PetClinic project if does not exist
|
||||||
|
if [ ! -d "$APP_DIR/.git" ]; then
|
||||||
|
git clone "$REPO_URL" "$APP_DIR"
|
||||||
|
# Pull latest changes if project already exists
|
||||||
|
else
|
||||||
|
cd "$APP_DIR"
|
||||||
|
git pull
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Navigate to the project directory
|
||||||
|
cd "$APP_DIR"
|
||||||
|
|
||||||
|
# Build the JAR file
|
||||||
|
./gradlew build
|
||||||
|
|
||||||
|
# Run the JAR file
|
||||||
|
nohup java -jar build/libs/$JAR_NAME > $APP_DIR/app.log 2>&1 &
|
||||||
|
|
||||||
|
SHELL
|
||||||
|
end
|
|
@ -1,4 +1,4 @@
|
||||||
welcome=Welcome
|
welcome=Welcome to Spring Petclinic
|
||||||
required=is required
|
required=is required
|
||||||
notFound=has not been found
|
notFound=has not been found
|
||||||
duplicate=is already in use
|
duplicate=is already in use
|
||||||
|
|
0
ubuntu-bionic-18.04-cloudimg-console.log
Normal file
0
ubuntu-bionic-18.04-cloudimg-console.log
Normal file
Loading…
Reference in a new issue