In the Spring framework, how is an Oracle data-source configured?
相关问题
- java.lang.IllegalArgumentException: Cannot set to
- Spring Data MongoDB - lazy access to some fields
- Declaring an explict object dependency in Spring
- Can I skip certificate verification oracle utl_htt
- Decoding body parameters with Spring
相关文章
- java JDK动态代理和cglib动态代理最后获取的代理对象都为null的问题
- node连接远程oracle报错
- oracle 11g expdp导出作业调用失败,提示丢包。
- org.xml.sax.SAXParseException; lineNumber: 7; colu
- SpringMVC如何把File封装到Map中?
- 执行一复杂的SQL语句效率高,还是执行多少简单的语句效率高
- Spring: controller inheritance using @Controller a
- How to load @Configuration classes from separate J
In the context.xml file:
Example of URL: jdbc:oracle:thin:@abc.def.ghi.com:1234:TEAM4
1. Since Oracle JDBC Driver is not in Maven repository, download it from http://www.oracle.com/technetwork/database/features/jdbc/default-2280470.html (for example Oracle Database 12.1.0.2 JDBC Driver) and add this driver through Maven command as follows:
(in my case)
2. Add in pom.xml
3. Add in application.properties file
Note you may want to add to the above that the Oracle driver does not have an open source licence so it will not be in the Maven central repository. You'll have to add it to your local repo.
To do this: Get the driver you want from: http://www.oracle.com/
Or you can get it from your oracle installation: {ORACLE_HOME}\jdbc\lib\ojdbc6.jar
Then run the following maven command:
This should install it in your local repository so when you reference it as user640378 states above it should work correctly.