updated: changed to war, ebs, and rds db path changed

This commit is contained in:
Snehit Roda 2024-07-26 00:58:47 -03:00
parent d8fcd11e67
commit 9fd593cdcc
4 changed files with 31 additions and 8 deletions

View file

@ -6,6 +6,7 @@
<groupId>org.springframework.samples</groupId> <groupId>org.springframework.samples</groupId>
<artifactId>spring-petclinic</artifactId> <artifactId>spring-petclinic</artifactId>
<version>3.3.0-SNAPSHOT</version> <version>3.3.0-SNAPSHOT</version>
<packaging>war</packaging> <!-- Setting packaging type to war -->
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
@ -221,7 +222,7 @@
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
<executions> <executions>
<execution> <execution>
<!-- Spring Boot Actuator displays build-related information <!-- Spring Boot Actuator displays build-related information
if a META-INF/build-info.properties file is present --> if a META-INF/build-info.properties file is present -->
<goals> <goals>
<goal>build-info</goal> <goal>build-info</goal>
@ -385,7 +386,7 @@
<build> <build>
<pluginManagement> <pluginManagement>
<plugins> <plugins>
<!-- This plugin's configuration is used to store Eclipse m2e settings <!-- This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. --> only. It has no influence on the Maven build itself. -->
<plugin> <plugin>
<groupId>org.eclipse.m2e</groupId> <groupId>org.eclipse.m2e</groupId>
@ -443,4 +444,4 @@
</profile> </profile>
</profiles> </profiles>
</project> </project>

View file

@ -1,7 +1,9 @@
# database init, supports mysql too # database init, supports mysql too
database=mysql database=mysql
spring.datasource.url=${MYSQL_URL:jdbc:mysql://localhost/petclinic} spring.datasource.url=${MYSQL_URL:jdbc:mysql://path:3306/petclinic}
spring.datasource.username=${MYSQL_USER:petclinic} spring.datasource.username=${MYSQL_USER:secret}
spring.datasource.password=${MYSQL_PASS:petclinic} spring.datasource.password=${MYSQL_PASS:secret}
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
# SQL is written to be idempotent so this is safe # SQL is written to be idempotent so this is safe
spring.sql.init.mode=always spring.sql.init.mode=always

View file

@ -3,6 +3,12 @@ database=h2
spring.sql.init.schema-locations=classpath*:db/${database}/schema.sql spring.sql.init.schema-locations=classpath*:db/${database}/schema.sql
spring.sql.init.data-locations=classpath*:db/${database}/data.sql spring.sql.init.data-locations=classpath*:db/${database}/data.sql
# used to elastic bean stalk
#server.port=5000
#active spring profile
spring.profiles.active=mysql
# Web # Web
spring.thymeleaf.mode=HTML spring.thymeleaf.mode=HTML

View file

@ -47,9 +47,23 @@
<br /> <br />
<br /> <br />
<h2>Pets and Visits</h2> <h2>Pets and Visits</h2>
<table class="table table-striped"> <table class="table table-striped">
<h3> Pet Photograph</h3>
<!-- TODO add the image from S3 for the respective pet -->
<div class="row">
<div class="col-md-12">
<img class="img-responsive" src="../static/resources/images/pets.png" th:src="@{/resources/images/pets.png}"/>
</div>
</div>
<br>
<tr th:each="pet : ${owner.pets}"> <tr th:each="pet : ${owner.pets}">
<td valign="top"> <td valign="top">
<dl class="dl-horizontal"> <dl class="dl-horizontal">