Skip to content

Commit

Permalink
[Refactor] 일단은 학교 db jdbc 기능 정지
Browse files Browse the repository at this point in the history
  • Loading branch information
hen715 committed Apr 29, 2024
1 parent 797d3d1 commit 1f743a5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import java.util.HashMap;
import java.util.Map;

@Configuration
/*@Configuration
@EnableTransactionManagement
@EnableJpaRepositories(basePackages = {"kr.inuappcenterportal.inuportal.repository"})
public class MySqlConfig {
Expand All @@ -44,4 +44,4 @@ public LocalContainerEntityManagerFactoryBean entityManagerFactory(EntityManager
PlatformTransactionManager transactionManager(@Qualifier("entityManagerFactory") EntityManagerFactory entityManagerFactory) {
return new JpaTransactionManager(entityManagerFactory);
}
}
}*/
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -36,13 +36,13 @@ 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();
}
@Bean(name = "oracleJdbc")
@Autowired
public JdbcTemplate jdbcTemplate(@Qualifier("oracleDataSource")DataSource dataSource){
return new JdbcTemplate(dataSource);
}
}*/
}
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public ResponseEntity<ResponseDto<Boolean>> 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)))
Expand All @@ -216,7 +216,7 @@ public ResponseEntity<ResponseDto<Boolean>> checkMail(@Valid@RequestBody EmailCh
@PostMapping("/login/school")
public ResponseEntity<ResponseDto<Boolean>> checkLogin(@Valid@RequestBody MemberLoginDto memberLoginDto) throws SQLException, ClassNotFoundException {;
return new ResponseEntity<>(new ResponseDto<>(schoolLoginRepository.loginCheck(memberLoginDto.getEmail(),memberLoginDto.getPassword()),"로그인 성공 여부 테스트"),HttpStatus.OK);
}
}*/


}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@Slf4j
public class SchoolLoginRepository {

@Autowired
/*@Autowired
@Qualifier("oracleJdbc")
private JdbcTemplate jdbcTemplate;
Expand All @@ -28,5 +28,5 @@ public boolean loginCheck(String username, String password) {
log.info("데이터베이스 연결 오류 메시지 : {}",e.getMessage());
return false;
}
}
}*/
}

0 comments on commit 1f743a5

Please sign in to comment.