This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <hibernate-configuration> | |
| <session-factory> | |
| <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> | |
| <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/databasename</property> | |
| <property name="hibernate.connection.username">username</property> | |
| <property name="hibernate.connection.password">password</property> | |
| <property name="hibernate.show_sql">true</property> | |
| <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property> | |
| <property name="hbm2ddl.auto">update</property> | |
| </session-factory> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Json:- | |
| { | |
| "id": "957c43f2-fa2e-42f9-bf75-6e3d5bb6960a", | |
| "name": "The Best Product", | |
| "brand": { | |
| "id": "9bcd817d-0141-42e6-8f04-e5aaab0980b6", | |
| "name": "ACME Products", | |
| "owner": { | |
| "id": "b21a80b1-0c09-4be3-9ebd-ea3653511c13", | |
| "name": "Ultimate Corp, Inc." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static void main(String[] args) { | |
| System.out.println("Program is running"); | |
| FutureCallback<String> callback = new FutureCallback<String>() { | |
| @Override | |
| public void onSuccess(@Nullable String result) { | |
| System.out.println(result); | |
| } | |
| @Override |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ObjectMapper mapper = new ObjectMapper(); | |
| JsonNode rootNode = null; | |
| try { | |
| rootNode = mapper.readTree(new File("/file/path/filename.json")); | |
| } catch (IOException e) { | |
| // TODO Auto-generated catch block | |
| e.printStackTrace(); | |
| } |
NewerOlder