diff --git a/.idea/.name b/.idea/.name deleted file mode 100644 index 496ee2c..0000000 --- a/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -.DS_Store \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..bfb2f1a --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..045865d --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..712ab9d --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml new file mode 100644 index 0000000..fdf8d99 --- /dev/null +++ b/.idea/kotlinc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..8a3502c --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,16 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..37fdf09 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/remote-targets.xml b/.idea/remote-targets.xml new file mode 100644 index 0000000..540ae32 --- /dev/null +++ b/.idea/remote-targets.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/weatherProject.iml b/.idea/weatherProject.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/.idea/weatherProject.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/userService/pom.xml b/userService/pom.xml index 322593a..d184b8c 100644 --- a/userService/pom.xml +++ b/userService/pom.xml @@ -63,12 +63,6 @@ spring-rabbit-test test - - - org.javassist - javassist - 3.30.2-GA - @@ -86,6 +80,10 @@ + + + + diff --git a/userService/src/main/java/weatherproject/userservice/UserServiceApplication.java b/userService/src/main/java/weatherproject/userservice/UserServiceApplication.java index ce3237f..408dfc6 100644 --- a/userService/src/main/java/weatherproject/userservice/UserServiceApplication.java +++ b/userService/src/main/java/weatherproject/userservice/UserServiceApplication.java @@ -1,11 +1,7 @@ package weatherproject.userservice; import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.data.jpa.repository.config.EnableJpaRepositories; @SpringBootApplication public class UserServiceApplication { diff --git a/userService/src/main/java/weatherproject/userservice/config/UserServiceConfig.java b/userService/src/main/java/weatherproject/userservice/config/UserServiceConfig.java deleted file mode 100644 index 6a223dd..0000000 --- a/userService/src/main/java/weatherproject/userservice/config/UserServiceConfig.java +++ /dev/null @@ -1,55 +0,0 @@ -//package weatherproject.userservice.config; -// -//import com.zaxxer.hikari.HikariConfig; -//import com.zaxxer.hikari.HikariDataSource; -//import org.springframework.beans.factory.annotation.Value; -//import org.springframework.context.annotation.Bean; -//import org.springframework.context.annotation.Configuration; -//import org.springframework.context.annotation.PropertySource; -//import org.springframework.data.jpa.repository.config.EnableJpaRepositories; -//import org.springframework.transaction.annotation.EnableTransactionManagement; -//import weatherproject.userservice.repository.UserRepository; -// -//import javax.sql.DataSource; -// -//@Configuration -//@EnableJpaRepositories(basePackageClasses = UserRepository.class) -//@EnableTransactionManagement -//@PropertySource("classpath:application.yml") // Подключаем файл с настройками -//public class UserServiceConfig { -// -// @Value("${spring.datasource.url}") -// private String dataSourceUrl; -// -// @Value("${spring.datasource.username}") -// private String dataSourceUsername; -// -// @Value("${spring.datasource.password}") -// private String dataSourcePassword; -// -// @Value("${spring.jpa.database-platform}") -// private String databasePlatform; -// -// @Value("${spring.datasource.hikari.allow-pool-suspension}") -// private boolean allowPoolSuspension; -// -// @Value("${spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation}") -// private boolean nonContextualLobCreation; -// -// @Value("${spring.jpa.properties.hibernate.format_sql}") -// private boolean formatSql; -// -// @Bean -// public DataSource dataSource() { -// HikariConfig hikariConfig = new HikariConfig(); -// hikariConfig.setJdbcUrl(dataSourceUrl); -// hikariConfig.setUsername(dataSourceUsername); -// hikariConfig.setPassword(dataSourcePassword); -// hikariConfig.setAllowPoolSuspension(allowPoolSuspension); -// -// return new HikariDataSource(hikariConfig); -// } -// -// // Другие настройки, бины и конфигурации могут быть добавлены сюда -// -//} diff --git a/userService/src/main/java/weatherproject/userservice/service/UserService.java b/userService/src/main/java/weatherproject/userservice/service/UserService.java index f35ac9a..700efda 100644 --- a/userService/src/main/java/weatherproject/userservice/service/UserService.java +++ b/userService/src/main/java/weatherproject/userservice/service/UserService.java @@ -14,7 +14,7 @@ @Service @RequiredArgsConstructor(onConstructor_ = {@Autowired}) -//конструктор добавляет ко всем полям аннотацию автовайред +//онконструктор добавляет ко всем полям аннотацию автовайред public class UserService { private final UserRepository userRepository; diff --git a/userService/src/main/resources/application.yml b/userService/src/main/resources/application.yml index bc09f56..f81d320 100644 --- a/userService/src/main/resources/application.yml +++ b/userService/src/main/resources/application.yml @@ -6,18 +6,9 @@ spring: username: username password: password jpa: - database-platform: org.hibernate.dialect.PostgreSQL94Dialect - properties: - hibernate: - dialect: org.hibernate.dialect.PostgreSQL94Dialect - jdbc: - lob: - non_contextual_creation: true - format_sql: true - boot: - allow_jdbc_metadata_access: false # Отключение использования метаданных JDBC hibernate: ddl-auto: update + show-sql: true rabbitmq: host: localhost port: 5672 diff --git a/userService/src/test/java/weatherproject/userservice/TGUserServiceApplicationTests.java b/userService/src/test/java/weatherproject/userservice/TGUserServiceApplicationTests.java index 2557abf..9ed6a6f 100644 --- a/userService/src/test/java/weatherproject/userservice/TGUserServiceApplicationTests.java +++ b/userService/src/test/java/weatherproject/userservice/TGUserServiceApplicationTests.java @@ -1,13 +1,11 @@ package weatherproject.userservice; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class TGUserServiceApplicationTests { - @Disabled @Test void contextLoads() { }