### Run Maven Install Source: https://github.com/spring-projects/spring-petclinic/blob/main/README.md This command installs the project artifacts using Maven. It can be executed from the command line or via IDE integration. ```bash mvn install ``` -------------------------------- ### Start MySQL Database with Docker Source: https://github.com/spring-projects/spring-petclinic/blob/main/README.md Run a MySQL database instance using Docker. This command configures the database with necessary credentials and ports for the Petclinic application. ```bash docker run -e MYSQL_USER=petclinic -e MYSQL_PASSWORD=petclinic -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:9.6 ``` -------------------------------- ### Start MySQL Database with Docker Compose Source: https://github.com/spring-projects/spring-petclinic/blob/main/README.md Start the MySQL database service defined in the docker-compose.yml file. This is a convenient way to manage database containers for the Petclinic application. ```bash docker compose up mysql ``` -------------------------------- ### Start PostgreSQL Database with Docker Source: https://github.com/spring-projects/spring-petclinic/blob/main/README.md Run a PostgreSQL database instance using Docker. This command configures the database with necessary credentials and ports for the Petclinic application. ```bash docker run -e POSTGRES_USER=petclinic -e POSTGRES_PASSWORD=petclinic -e POSTGRES_DB=petclinic -p 5432:5432 postgres:18.3 ``` -------------------------------- ### Start PostgreSQL Database with Docker Compose Source: https://github.com/spring-projects/spring-petclinic/blob/main/README.md Start the PostgreSQL database service defined in the docker-compose.yml file. This is a convenient way to manage database containers for the Petclinic application. ```bash docker compose up postgres ``` -------------------------------- ### Run Docker Compose Source: https://github.com/spring-projects/spring-petclinic/blob/main/src/main/resources/db/postgres/petclinic_db_setup_postgres.txt Execute the Docker Compose file to start the PostgreSQL database service for the application. ```bash $ docker-compose up ``` -------------------------------- ### Run Spring Petclinic with Gradle Source: https://github.com/spring-projects/spring-petclinic/blob/main/README.md Start the Spring Petclinic application using the Gradle wrapper. This command compiles and runs the application, making it accessible via a web browser. ```bash ./gradlew bootRun ``` -------------------------------- ### Run Spring Petclinic with Maven Source: https://github.com/spring-projects/spring-petclinic/blob/main/README.md Start the Spring Petclinic application using the Maven wrapper. This command compiles and runs the application, making it accessible via a web browser. ```bash ./mvnw spring-boot:run ``` -------------------------------- ### Clone and Run Spring PetClinic Source: https://github.com/spring-projects/spring-petclinic/wiki/home-petclinic Clone the repository and run the application using Maven. ```bash git clone https://github.com/SpringSource/spring-petclinic.git mvn tomcat7:run ``` -------------------------------- ### Build Container Image for Spring Petclinic Source: https://github.com/spring-projects/spring-petclinic/blob/main/README.md Build a Docker container image for the Spring Petclinic application using the Maven Spring Boot plugin. This allows for easy deployment and execution in containerized environments. ```bash ./mvnw spring-boot:build-image ``` -------------------------------- ### Run Spring Boot with PostgreSQL Profile Source: https://github.com/spring-projects/spring-petclinic/blob/main/src/main/resources/db/postgres/petclinic_db_setup_postgres.txt Activate the 'postgres' profile when running the Spring Boot application using Maven to connect to the PostgreSQL database. ```bash mvn spring-boot:run -Dspring-boot.run.profiles=postgres ``` -------------------------------- ### Clone Spring Petclinic Repository Source: https://github.com/spring-projects/spring-petclinic/blob/main/README.md Clone the Spring Petclinic project locally to begin development or exploration. Navigate into the cloned directory to proceed with build commands. ```bash git clone https://github.com/spring-projects/spring-petclinic.git cd spring-petclinic ``` -------------------------------- ### Compile CSS Resources with Maven Profile Source: https://github.com/spring-projects/spring-petclinic/blob/main/README.md This command compiles CSS resources using the 'css' Maven profile. This is required when SCSS files are modified or Bootstrap is upgraded. ```bash ./mvnw package -P css ``` -------------------------------- ### Run Spring PetClinic with MySQL Profile Source: https://github.com/spring-projects/spring-petclinic/blob/main/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt Activate the MySQL profile when running the Spring PetClinic application using Maven. This ensures the application connects to the MySQL database. ```bash mvn spring-boot:run -Dspring-boot.run.profiles=mysql ``` -------------------------------- ### Generate CSS Resources with Maven Source: https://github.com/spring-projects/spring-petclinic/blob/main/README.md This command generates CSS resources from SCSS files using a Maven profile. It's necessary if you modify SCSS files or upgrade Bootstrap. ```bash ./mvnw generate-resources ``` -------------------------------- ### Clone Spring PetClinic Repository Source: https://github.com/spring-projects/spring-petclinic/wiki/home-petclinic Clone the Spring PetClinic project from GitHub. ```bash git clone https://github.com/SpringSource/spring-petclinic.git ``` -------------------------------- ### Import Maven Project in Eclipse/STS Source: https://github.com/spring-projects/spring-petclinic/wiki/home-petclinic Import an existing Maven project into Eclipse or Spring Tool Suite. ```text File -> Import -> Maven -> Existing Maven project ``` -------------------------------- ### Run Spring Petclinic Container Image Source: https://github.com/spring-projects/spring-petclinic/blob/main/README.md Run the Spring Petclinic Docker container image. This command maps the container's port 8080 to the host's port 8080, allowing access to the application. ```bash docker run -p 8080:8080 docker.io/library/spring-petclinic:latest ``` -------------------------------- ### Hide Messages with JavaScript Source: https://github.com/spring-projects/spring-petclinic/blob/main/src/main/resources/templates/owners/ownerDetails.html Hides success and error messages displayed on the page after a 3-second delay. This is useful for temporary notifications. ```javascript // Function to hide the success and error messages after 3 seconds function hideMessages() { setTimeout(function () { document.getElementById("success-message").style.display = "none"; document.getElementById("error-message").style.display = "none"; }, 3000); // 3000 milliseconds (3 seconds) } // Call the function to hide messages hideMessages(); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.