简体   繁体   中英

Migrating database in spring application

在春季集成的休眠应用程序中,我需要在不更改代码的情况下将数据库从sql server更改为oracle?

If you really just want to change the datasource

have a look at the documentation here Spring Documentation for Oracle JDBC

  • You need to change your datasource that you use to point to Oracle.
  • Import the JDBC dependency for the Oracle JDBC connector as a dependency
  • Configure Hibernate to use the correct dialect eg oracle.jdbc.driver.OracleDriver

Don't know how you configure your environment, but that should get you started.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM