Добавил репозиторий, реализовал добавление, вывод и фильтрацию сообщений.

https://www.youtube.com/watch?v=nyFLX3q3poY&list=PLU2ftbIeotGoGSEUf54LQH-DgiQPF2XRO&index=3
This commit is contained in:
Leonid
2025-02-02 22:00:00 +03:00
parent 710e41ba6a
commit a44391dcf7
7 changed files with 146 additions and 4 deletions

View 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

View File

@@ -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>