diff --git a/src/main/java/ru/cathub/telegabot/config/OpenRouterConfig.java b/src/main/java/ru/cathub/telegabot/configuration/OpenRouterConfig.java similarity index 89% rename from src/main/java/ru/cathub/telegabot/config/OpenRouterConfig.java rename to src/main/java/ru/cathub/telegabot/configuration/OpenRouterConfig.java index 05381c6..7b19aef 100644 --- a/src/main/java/ru/cathub/telegabot/config/OpenRouterConfig.java +++ b/src/main/java/ru/cathub/telegabot/configuration/OpenRouterConfig.java @@ -1,4 +1,4 @@ -package ru.cathub.telegabot.config; +package ru.cathub.telegabot.configuration; import lombok.Getter; import lombok.Setter; diff --git a/src/main/java/ru/cathub/telegabot/service/impl/OpenRouterServiceImpl.java b/src/main/java/ru/cathub/telegabot/service/impl/OpenRouterServiceImpl.java index ab890ac..ee6a7a9 100644 --- a/src/main/java/ru/cathub/telegabot/service/impl/OpenRouterServiceImpl.java +++ b/src/main/java/ru/cathub/telegabot/service/impl/OpenRouterServiceImpl.java @@ -8,7 +8,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; import org.springframework.web.client.RestClientException; import org.springframework.web.client.RestTemplate; -import ru.cathub.telegabot.config.OpenRouterConfig; +import ru.cathub.telegabot.configuration.OpenRouterConfig; import ru.cathub.telegabot.exception.OpenRouterException; import ru.cathub.telegabot.service.OpenRouterService; @@ -52,7 +52,7 @@ public class OpenRouterServiceImpl implements OpenRouterService { } } - private String extractResponse(Map response) { + private String extractResponse(Map response) throws OpenRouterException { try { List> choices = (List>) response.get("choices"); Map firstChoice = choices.get(0); diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties deleted file mode 100644 index d2dbb92..0000000 --- a/src/test/resources/application.properties +++ /dev/null @@ -1,39 +0,0 @@ -spring.application.name=TelegaBot -# Telegram configuration -bot.token=5908676914:AAGU9LVyXYZYafpRgwOf1tolk0HGYvcHszY -bot.name=TelegaBot - -# Database configuration - - -spring.jpa.hibernate.ddl-auto=validate -spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect -spring.datasource.driver-class-name=org.postgresql.Driver -spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect - - -spring.datasource.url=jdbc:postgresql://192.168.0.10:5432/telegabot -spring.datasource.username=postgres -spring.datasource.password=Vftrixpo05 - -# Flyway Configuration -spring.flyway.enabled=true -spring.flyway.locations=classpath:db/migration -spring.flyway.baseline-on-migrate=true -spring.flyway.validate-on-migrate=true -spring.flyway.Schemas=telegabot - - - - -# ?????????? SQL-??????? -spring.jpa.show-sql=true -spring.jpa.properties.hibernate.format_sql=false - -# ?????????? ????????? ???????? -logging.level.org.hibernate.SQL=DEBUG -logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE -logging.level.io.hypersistence.utils.hibernate.query=DEBUG - -# ??????????? ???? -logging.level.org.springframework.cache=INFO