JdbcHibernate连接Oracle 、 MySQL

    技术2022-05-19  34

    连接Oracle :

     

        public static final String CLASSNAME = "oracle.jdbc.driver.OracleDriver" ;     public static final String URL = "jdbc:oracle:thin:@192.168.0.167:1521:orcl" ;     public static final String USERNAME = "scott" ;     public static final String PASSWORD = "tiger" ;

     

     

    连接MySQL :

     

        <property name="connection.url">jdbc:mysql://localhost:3306/etp</property>     <property name="connection.driver_class">com.mysql.jdbc.Driver</property>

        <property name="connection.username">root</property>     <property name="connection.password">root</property>


    最新回复(0)