1. DB 연결 관련 Dao, Vo 자바 파일 생성

2. Fcontroller에 해당 내용 추가 및 임포트
3. 출력 테스트를 위한 View 파일 추가
This commit is contained in:
mcutegs2
2020-06-15 19:22:45 +09:00
parent d902a4a65a
commit e2e4c47a15
10 changed files with 440 additions and 25 deletions

View File

@@ -0,0 +1,28 @@
package DB;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
public class BasicDao {
private String driver = "com.mysql.jdbc.Driver";
private String url = "jdbc:mysql://@110.35.119.108:3307:hospital_DB";
private String user = "mes";
private String password = "Mestkdrhdghldmlth1!";
protected Connection conn;
protected PreparedStatement psmt;
protected ResultSet rs;
public BasicDao() {
try {
Class.forName(this.driver);
this.conn = DriverManager.getConnection(this.url, this.user, this.password);
} catch (SQLException | ClassNotFoundException var2) {
var2.printStackTrace();
}
}
}