1. 게시판 DB를 서버로 이관하기
- DB 서버용 계정 'ODOUNG' 생성하기
- 게시판 관련 DB 이관하기
2. Connection 적용
package utils;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class DBConn {
public static Connection getConnection() throws SQLException, ClassNotFoundException {
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@np.yermi.works:1521/xe", "ODOUNG", "1234");
return conn;
}
public static void main(String[] args) throws Exception {
System.out.println(getConnection());
}
}