java - Why not access update DB in jax-rs web service -


i create jax-rs web service using following technology. can't update db

technology used

  • java 1.8
  • eclipse luna ide
  • resteasy-3.0.8.final
  • spring-framework-3.2.11.release
  • hibernate-4.2.15.final
  • apache maven 3.2.1
  • apache tomcat 8.0.23
  • mysql-connector-java-5.1.32

this spring-hibernate-resteasy.xml

<?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans"     xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:context="http://www.springframework.org/schema/context"     xmlns:tx="http://www.springframework.org/schema/tx"     xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd     http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd     http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">  <!-- activate annotations in beans registered in applicationcontext --> <context:annotation-config />  <!-- scans packages find , register beans within application context --> <context:component-scan base-package="com.resteasy.series.spring.hibernate" />  <!-- turn on spring transaction annotation --> <tx:annotation-driven transaction-manager="transactionmanager" />  <!-- transaction manager --> <bean id="transactionmanager"     class="org.springframework.orm.hibernate4.hibernatetransactionmanager">     <property name="sessionfactory" ref="sessionfactory" /> </bean>  <!-- session factory --> <bean id="sessionfactory"     class="org.springframework.orm.hibernate4.localsessionfactorybean">     <property name="datasource" ref="datasource" />     <property name="annotatedclasses">         <list>             <value>com.resteasy.series.spring.hibernate.model.customer</value>         </list>     </property>     <property name="hibernateproperties">         <props>             <prop key="hibernate.dialect">org.hibernate.dialect.mysqldialect</prop>             <prop key="hibernate.hbm2ddl.auto">update</prop>             <prop key="hibernate.show_sql">true</prop>         </props>     </property> </bean>  <!-- datasource configuration --> <bean id="datasource"     class="org.springframework.jdbc.datasource.drivermanagerdatasource">     <property name="driverclassname" value="com.mysql.jdbc.driver" />     <property name="url" value="jdbc:mysql://localhost:3306/dbname" />     <property name="username" value="root" />     <property name="password" value="" /> </bean> 

i follow article create web service link.

why happen me? how solve in scenario. can data db, can't update db.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -