Compare commits

...

2 Commits

Author SHA1 Message Date
chanthasuon
8070cfd4e9 "code line 44" 2020-04-30 17:25:46 +07:00
chanthasuon
39f215b9b3 "code line 44" 2020-04-30 16:51:19 +07:00
3 changed files with 14 additions and 8 deletions

View File

@ -56,8 +56,15 @@
<artifactId>postgresql</artifactId> <artifactId>postgresql</artifactId>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.20</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa -->
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId> <artifactId>spring-boot-starter-data-jpa</artifactId>

View File

@ -1,8 +1,7 @@
spring.thymeleaf.cache=false spring.thymeleaf.cache=false
spring.jpa.hibernate.ddl-auto=update spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:postgresql://localhost:5432/dbfoof spring.datasource.url=jdbc:mysql://localhost:3309/dbfood?createDatabaseIfNotExist=true&allowPublicKeyRetrieval=true&useSSL=false
spring.datasource.username=postgres spring.datasource.username=root
spring.datasource.password=postgres spring.datasource.password=root
spring.jpa.open-in-view=true spring.jpa.open-in-view=true
server.port=8010 server.port=8181
server.servlet.session.tracking-modes=cookie

View File

@ -38,7 +38,7 @@
<div class="modal-body"> <div class="modal-body">
<form class="user" id="frmProductAdd" th:action="@{/admin/product/add}" th:object="${product}" enctype="multipart/form-data" method="POST"> <form class="user" id="frmProductAdd" th:action="@{/admin/product/add}" th:object="${product}" enctype="multipart/form-data" method="POST">
<div class="form-group"> <div class="form-group">
<input type="text" class="form-control" id="name" name="name" placeholder="Product..." required pattern="[A-Za-z]"> <input type="text" class="form-control" id="name" name="name" placeholder="Product..." required >
</div> </div>
<div class="form-group"> <div class="form-group">
<input type="text" class="form-control" id="price" name="price" placeholder="Price" required pattern="[0-9]+(\.[0-9]{1,2})?%?"> <input type="text" class="form-control" id="price" name="price" placeholder="Price" required pattern="[0-9]+(\.[0-9]{1,2})?%?">