Spring Boot: Connect to OrientDB

  1. JDBC Driver
  <dependency>
   <groupId>com.orientechnologies</groupId>
   <artifactId>orientdb-jdbc</artifactId>
   <version>2.2.22</version>/*Version OrientDB*/
  </dependency>

  Properties info = new Properties();
  info.put("user", "root");
  info.put("password", "root");

  Connection conn = (OrientJdbcConnection) DriverManager.getConnection("jdbc:orient:remote:localhost/ERPDB", info);//ERPDB => Database Name
  Statement stmt = conn.createStatement();

  ResultSet rs = stmt.executeQuery("SELECT Name,Address,Gender FROM Student");
  rs.next();

Advertisements
This entry was posted in Spring. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s