Guest User

Untitled

a guest
Feb 27th, 2018
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.84 KB | None | 0 0
  1. 1. Most of the given solutions start with the xml code as a string saved in a variable. However I am working with .xml files.
  2. 2. No program works on different types of xml files.
  3. 3. I am trying to convert xml config files occurring in various java programs so that I can learn from their various attributes. (By learn I mean run a ML algorithm on the collected features.)0
  4.  
  5. <?xml version='1.0' encoding='UTF-8'?>
  6. <!DOCTYPE hibernate-configuration PUBLIC
  7. "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
  8. "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
  9.  
  10.  
  11. <hibernate-configuration>
  12.  
  13. <session-factory>
  14. <property name="hbm2ddl.auto">create</property>
  15. <property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
  16. <property name="connection.url">jdbc:oracle:thin:@localhost:1521:xe</property>
  17. <property name="connection.username">system</property>
  18. <property name="connection.password">oracle</property>
  19. <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
  20.  
  21. <mapping class="com.javatpoint.Employee"/>
  22. </session-factory>
  23.  
  24. </hibernate-configuration>
  25.  
  26. <?xml version="1.0" encoding="UTF-8"?>
  27.  
  28. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  29. xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http://www.springframework.org/schema/context"
  30. xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
  31. http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
  32. http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
  33.  
  34.  
  35. <context:component-scan
  36. base-package="com.cde"/>
  37.  
  38.  
  39. <mvc:annotation-driven />
  40.  
  41. <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
  42. <!-- Example: a logical view name of 'showMessage' is mapped to '/WEB-INF/jsp/showMessage.jsp' -->
  43. <property name="prefix" value="/WEB-INF/view/"/>
  44. <property name="suffix" value=".jsp"/>
  45. </bean>
  46.  
  47.  
  48. <bean id="ds"
  49. class="org.springframework.jdbc.datasource.DriverManagerDataSource">
  50. <property name="driverClassName" value="undefined" />
  51. <property name="url" value="jdbc:mysql://localhost:2123/JDBCtemplatejava" />
  52. <property name="username" value="root" />
  53. <property name="password" value="password-1" />
  54. </bean>
  55.  
  56. <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
  57. <property name="dataSource" ref="ds"></property>
  58. </bean>
  59.  
  60. <bean id="edao" class="com.cde.dao.EmployeeDao">
  61. <property name="jdbcTemplate" ref="jdbcTemplate"></property>
  62. </bean>
  63.  
  64. </beans>
Add Comment
Please, Sign In to add comment