From 1f743a5b86979d778e5af916e24c0e1837b62233 Mon Sep 17 00:00:00 2001 From: hen715 Date: Tue, 30 Apr 2024 00:16:40 +0900 Subject: [PATCH] =?UTF-8?q?[Refactor]=20=EC=9D=BC=EB=8B=A8=EC=9D=80=20?= =?UTF-8?q?=ED=95=99=EA=B5=90=20db=20jdbc=20=EA=B8=B0=EB=8A=A5=20=EC=A0=95?= =?UTF-8?q?=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inuappcenterportal/inuportal/config/MySqlConfig.java | 4 ++-- .../inuappcenterportal/inuportal/config/OracleConfig.java | 8 ++++---- .../inuportal/controller/MemberController.java | 4 ++-- .../inuportal/oracleRepository/SchoolLoginRepository.java | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/kr/inuappcenterportal/inuportal/config/MySqlConfig.java b/src/main/java/kr/inuappcenterportal/inuportal/config/MySqlConfig.java index f8fecd5..3610fbc 100644 --- a/src/main/java/kr/inuappcenterportal/inuportal/config/MySqlConfig.java +++ b/src/main/java/kr/inuappcenterportal/inuportal/config/MySqlConfig.java @@ -19,7 +19,7 @@ import java.util.HashMap; import java.util.Map; -@Configuration +/*@Configuration @EnableTransactionManagement @EnableJpaRepositories(basePackages = {"kr.inuappcenterportal.inuportal.repository"}) public class MySqlConfig { @@ -44,4 +44,4 @@ public LocalContainerEntityManagerFactoryBean entityManagerFactory(EntityManager PlatformTransactionManager transactionManager(@Qualifier("entityManagerFactory") EntityManagerFactory entityManagerFactory) { return new JpaTransactionManager(entityManagerFactory); } -} +}*/ diff --git a/src/main/java/kr/inuappcenterportal/inuportal/config/OracleConfig.java b/src/main/java/kr/inuappcenterportal/inuportal/config/OracleConfig.java index 165ae6e..18f4f68 100644 --- a/src/main/java/kr/inuappcenterportal/inuportal/config/OracleConfig.java +++ b/src/main/java/kr/inuappcenterportal/inuportal/config/OracleConfig.java @@ -24,10 +24,10 @@ public class OracleConfig { private String username; @Value("${schoolDbPassword}") private String password; - @Bean(name = "oracleDataSource") + /*@Bean(name = "oracleDataSource") @ConfigurationProperties(prefix = "school.datasource") public DataSource secondDataSource() { - /*HikariConfig config = new HikariConfig(); + *//*HikariConfig config = new HikariConfig(); config.setJdbcUrl(url); config.setUsername(username); config.setPassword(password); @@ -36,7 +36,7 @@ public DataSource secondDataSource() { config.setMinimumIdle(1); config.setConnectionTimeout(60000); // milliseconds config.setIdleTimeout(600000); // milliseconds - return new HikariDataSource(config);*/ + return new HikariDataSource(config);*//* return DataSourceBuilder.create().type(HikariDataSource.class).build(); } @@ -44,5 +44,5 @@ public DataSource secondDataSource() { @Autowired public JdbcTemplate jdbcTemplate(@Qualifier("oracleDataSource")DataSource dataSource){ return new JdbcTemplate(dataSource); - } + }*/ } diff --git a/src/main/java/kr/inuappcenterportal/inuportal/controller/MemberController.java b/src/main/java/kr/inuappcenterportal/inuportal/controller/MemberController.java index 16d10c2..026f491 100644 --- a/src/main/java/kr/inuappcenterportal/inuportal/controller/MemberController.java +++ b/src/main/java/kr/inuappcenterportal/inuportal/controller/MemberController.java @@ -207,7 +207,7 @@ public ResponseEntity> checkMail(@Valid@RequestBody EmailCh return new ResponseEntity<>(new ResponseDto<>(memberService.checkNumbers(emailCheckDto),"가입 인증번호 일치확인 성공"),HttpStatus.OK); } - +/* @Operation(summary = "테스트용 api 사용 x ",description = "바디에 {학번(id),비밀번호(password}을 json 형식으로 보내주세요. 성공 시 인증번호 일치 여부가 {data:boolean} 형식으로 보내집니다.") @ApiResponses({ @ApiResponse(responseCode = "200",description = "가입 인증번호 일치 확인 성공",content = @Content(schema = @Schema(implementation = ResponseDto.class))) @@ -216,7 +216,7 @@ public ResponseEntity> checkMail(@Valid@RequestBody EmailCh @PostMapping("/login/school") public ResponseEntity> checkLogin(@Valid@RequestBody MemberLoginDto memberLoginDto) throws SQLException, ClassNotFoundException {; return new ResponseEntity<>(new ResponseDto<>(schoolLoginRepository.loginCheck(memberLoginDto.getEmail(),memberLoginDto.getPassword()),"로그인 성공 여부 테스트"),HttpStatus.OK); - } + }*/ } diff --git a/src/main/java/kr/inuappcenterportal/inuportal/oracleRepository/SchoolLoginRepository.java b/src/main/java/kr/inuappcenterportal/inuportal/oracleRepository/SchoolLoginRepository.java index 990d36b..e7ed1e7 100644 --- a/src/main/java/kr/inuappcenterportal/inuportal/oracleRepository/SchoolLoginRepository.java +++ b/src/main/java/kr/inuappcenterportal/inuportal/oracleRepository/SchoolLoginRepository.java @@ -14,7 +14,7 @@ @Slf4j public class SchoolLoginRepository { - @Autowired + /*@Autowired @Qualifier("oracleJdbc") private JdbcTemplate jdbcTemplate; @@ -28,5 +28,5 @@ public boolean loginCheck(String username, String password) { log.info("데이터베이스 연결 오류 메시지 : {}",e.getMessage()); return false; } - } + }*/ }