From 942f5eaa6ff9bdd997e516d9eb445cc768d7641a Mon Sep 17 00:00:00 2001 From: Sanders Date: Fri, 14 Feb 2025 10:34:16 +0300 Subject: [PATCH] Add secret --- .gitignore | 2 +- .../java/ru/cathub/telegabot/utils/BookFormatUtils.java | 4 ++++ src/main/resources/application-secrets.properties | 8 ++++++++ src/main/resources/application.properties | 1 - 4 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/application-secrets.properties diff --git a/.gitignore b/.gitignore index 7c9983a..cb07dea 100644 --- a/.gitignore +++ b/.gitignore @@ -38,5 +38,5 @@ out/ .aider* ### Secret configurations ### -src/main/resources/application-secrets.properties +###src/main/resources/application-secrets.properties *.secrets.* diff --git a/src/main/java/ru/cathub/telegabot/utils/BookFormatUtils.java b/src/main/java/ru/cathub/telegabot/utils/BookFormatUtils.java index d714b98..1d94238 100644 --- a/src/main/java/ru/cathub/telegabot/utils/BookFormatUtils.java +++ b/src/main/java/ru/cathub/telegabot/utils/BookFormatUtils.java @@ -1,6 +1,10 @@ package ru.cathub.telegabot.utils; import ru.cathub.telegabot.model.Book; + +import java.sql.Date; +import java.text.SimpleDateFormat; + import static ru.cathub.telegabot.utils.Constants.*; public class BookFormatUtils { diff --git a/src/main/resources/application-secrets.properties b/src/main/resources/application-secrets.properties new file mode 100644 index 0000000..34a91e7 --- /dev/null +++ b/src/main/resources/application-secrets.properties @@ -0,0 +1,8 @@ +# Telegram configuration +bot.token=5908676914:AAGU9LVyXYZYafpRgwOf1tolk0HGYvcHszY +bot.name=TelegaBot + +# Database configuration +spring.datasource.url=jdbc:postgresql://192.168.0.10:5432/telegabot +spring.datasource.username=postgres +spring.datasource.password=Vftrixpo05 \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 86e10ef..61b6f9a 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,5 +1,4 @@ spring.application.name=TelegaBot -cbr.currency.rates.xml.url=http://www.cbr.ru/scripts/XML_daily.asp spring.jpa.hibernate.ddl-auto=validate spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect