You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
756 B
37 lines
756 B
package in.gov.chennaicorporation.gccoffice.pgr.dbconnection;
|
|
|
|
import java.sql.Connection;
|
|
|
|
import java.sql.DriverManager;
|
|
import java.sql.SQLException;
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
@Component
|
|
public class DBConnection {
|
|
|
|
private static Connection dbcon;
|
|
|
|
private static final String l_sUrl = "jdbc:oracle:thin:@10.1.0.14:1521:chncorp";
|
|
private static final String user="FAS";
|
|
private static final String password="FAS";
|
|
|
|
|
|
|
|
public static Connection getConnection() {
|
|
try {
|
|
|
|
|
|
Connection pgr_Con = DriverManager.getConnection(l_sUrl,user,password);
|
|
System.out.println("pgr_conn Con :"+ l_sUrl );
|
|
|
|
dbcon=pgr_Con;
|
|
return pgr_Con;
|
|
|
|
} catch (SQLException e) {
|
|
e.printStackTrace();
|
|
}
|
|
return dbcon;
|
|
}
|
|
|
|
}
|