질문있습니다. 커넥션풀
184
작성한 질문수 4
간단하게 테스트하려고 소스짯는데요. 맞는지 모르겠네요.
스프링컨테이너XML파일에 ComboPooledDataSource 정의하였구요.
@Autowired으로 자동 주입해서 썻습니다..
정상적으로 실행은 되는데요. 여기서 자원을 따로 해제할 필요는 없나요?
@Autowired
ComboPooledDataSource db;
@RequestMapping(value = "/leejaemin", method = RequestMethod.GET)
public String leejaemin() {
Connection conn = null;
ResultSet rs= null;
PreparedStatement pstmt =null;
try {
conn = db.getConnection();
String sql = "select * from member";
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
while (rs.next()) {
String gameCode = rs.getString("MEMID");
System.out.println(gameCode);
}
}
catch (SQLException e) {
System.out.println(e.getMessage());
} finally {
}
return "/index";
}
}
답변 0
spring mvc project 안뜸...
0
172
1
Project 'ch02_pjt_01' has no explicit encoding set ch02_pjt_01 /ch02_pjt_01 No explicit project encoding
0
2075
1
xml 부분 오류가 나옵니다.
0
302
1
spring legacy project 발견되지 않아서 문의 드립니다!
0
671
1
StudentDao파일은 생성자가 없는데 왜그런가요?
0
383
1
스프링 레거시 프로젝트 생성 오류 질문드립니다.
0
390
1
application context.xml 관련 문의
0
571
2
StudentAssembler 클래스 질문드립니다.
0
340
0
sts를 설치하니까 해당 오류때문에 진도를 못나가고있습니다..
0
1055
1
qualifier 를 왜 [퀄리필러]로 발음 하시는지 ㅠㅠ 처음에 잘 못알아들엇네요
2
472
0
spring MVC project 가 보이지 않아요
0
484
1
'커넥션 풀' 등 DB와 연동하는 setup 에서의 유저정보 노출의 문제
0
322
0
memLogin 메서드에서 @RequestParam으로 받을시
0
229
0
model 파라미터가 들어온다고 하셨는데
0
275
1
import 시, pom.xml 파일 인식 못함
0
784
1
해결법 - The type org.springframework.context.ConfigurableApplicationContext cannot be resolved.
0
1380
0
12강 어노테이션에서 MainClassUseConfiguration.java 이거 돌리면 Cannot load configuration class: ems.member.configuration.MemberConfig 에러 나오는데 어떻게 해결하나요
0
1439
2
질문드립니다!
0
258
0
STS 설치와 MVC 프로젝트 생성 에러
0
336
0
처음 시작하며 compiler path 또는 version 관련 에러로 run 안될시
1
296
1
Join 과 Main으로 가는 링크 질문 (17강 13분)
0
232
0
싱글톤이 뭔가요..
0
916
2
14강 STS3 설치시 마켓플레이스에서 찾을 수 없을 때 해결방법
3
2853
0
이런 에러가 나오는데요. 왜 그런 걸까요?
0
309
1





