Добавил репозиторий, реализовал добавление, вывод и фильтрацию сообщений.
https://www.youtube.com/watch?v=nyFLX3q3poY&list=PLU2ftbIeotGoGSEUf54LQH-DgiQPF2XRO&index=3
This commit is contained in:
6
src/main/resources/application.properties
Normal file
6
src/main/resources/application.properties
Normal file
@@ -0,0 +1,6 @@
|
||||
spring.jpa.hibernate.ddl-auto = update
|
||||
spring.datasource.url=jdbc:postgresql://localhost:5454/sweater_db
|
||||
spring.datasource.username=user
|
||||
spring.datasource.password=123456
|
||||
spring.datasource.driver-class-name=org.postgresql.Driver
|
||||
spring.jpa.show-sql: true
|
||||
@@ -1,5 +1,29 @@
|
||||
<html>
|
||||
<body>
|
||||
<div>{{some}}<div>
|
||||
<div>
|
||||
<form method="post">
|
||||
<input type="text" name="text" placeholder="Enter message"> </input>
|
||||
<input type="text" name="tag" placeholder="tag"></input>
|
||||
<button type="submit">Add message</button>
|
||||
</form>
|
||||
</div
|
||||
<div>
|
||||
<form method="post" action="filter">
|
||||
Tag to filer
|
||||
<br>
|
||||
<input type="text" name="tag">
|
||||
<button>Find</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div>Messages list</div>
|
||||
{{#messages}}
|
||||
<div>
|
||||
<b>{{id}}</b>
|
||||
<span>{{text}}</span>
|
||||
<i>{{tag}}</i>
|
||||
</div>
|
||||
{{/messages}}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user