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

11
pom.xml
View File

@ -56,8 +56,15 @@
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa -->
<!-- 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 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>

View File

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

View File

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