jdbc

JAVA/JSP & Servlet

커넥션풀 [JSP 기초]

1. 커넥션풀이란? 커넥션풀이란 객체를 미리 생성해 풀(pool)에 넣어놓고 요청이 있을 때마다 이미 생성된 Connection 객체를 가져다 쓰고 다시 반환하는 방법이다. 사용이 끝난 객체를 연결 해제하지 않고 반납하여 다시 사용할 수 있도록 하는 것이다. 복잡성을 줄이기 위해 환경설정과 연결 관리 등은 xml파일에서 따로 관리하고 필요할 때마다 획득하여 사용하는 것이다. 2. 커넥션풀 사용하는법 - MySQL Server에 context.xml에 들어간다. - context.xml 본 Server의 context.xml 에 삽입 자바 클래스에 /musthave?useSSL=false&serverTimezone=UTC 적었던 것을 아래와 같이 적어야한다. /musthave?useSSL=false&ser..

Spring/Hibernate

[Spring] 하이버네이트(Hibernate) 사용하는법

메이븐에서 사용하는법👇👇👇👇👇👇 https://myvelop.tistory.com/71 [Maven] 하이버네이트 사용하기(feat. pom.xml) Maven파일에서 하이버네이트를 사용하는법을 알아보자 1. Hibernate에 들어가서 확인해보기 바로가기 👇👇👇👇👇👇 하이버네이트 홈페이지: https://hibernate.org/ Hibernate. Everything data. - Hibernate M. myvelop.tistory.com 1. Hibernate 설치 http://hibernate.org/ Hibernate. Everything data. - Hibernate More than an ORM, discover the Hibernate galaxy. hibernate.org Hiberna..

JAVA/JSP & Servlet

JDBC 연결 - 오류 발생의 사례들

JDBC를 사용하다보면 여러가지 오류가 발생하게 되는데 대체로 url이나 driver 설정과정에서 문제가 생긴다 1. driver 문제 문제의 코드 Class.forName("com.mysql.jdbc.Driver"); 예전에 쓰이던 드라이버 클래스이다. 실행은 되지만 아래와 같은 경고창이 뜬다. Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. 정상작동..

gakko
'jdbc' 태그의 글 목록