Smartclient+demo+实例

阅读更多

此文为转载

 

用实例见证smartclient的厉害吧。Smartclient+demo+实例_第1张图片

[html] view plain copy print ?
 
  1. 先貼出來圖片炫炫!很閃吧。
  2. 建表語句:
  3. createtablesupplyItem(
  4. itemIDintprimarykeyidentity(1,1),
  5. itemNamevarchar(300),
  6. unitCostdecimal(28,2),--55.23
  7. SKUvarchar(30),
  8. descriptionvarchar(5000),
  9. categoryvarchar(128),
  10. inStockvarchar(30),
  11. unitsvarchar(30),
  12. nextShipmentdatetime
  13. )
  14. --droptablesupplyCategory
  15. createtablesupplyCategory(
  16. categoryNamevarchar(128)primarykey,
  17. parentIDvarchar(255),
  18. )
  19. demoAppJS.jsp
  20. Jsp代碼:
  21. <context:component-scanbase-package="isc.java.*"/>
  22. <mvc:annotation-driven/>
  23. <beanid="viewResolver"class="org.springframework.web.servlet.view.InternalResourceViewResolver">
  24. <propertyname="viewClass"value="org.springframework.web.servlet.view.JstlView"/>
  25. <propertyname="suffix"value=".action"/>
  26. bean>
  27. <importresource="db-config.xml"/>
  28. beans>
  29. Db-config.xml
  30. xmlversion="1.0"encoding="UTF-8"?>
  31. <beansxmlns="http://www.springframework.org/schema/beans"
  32. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  33. xmlns:tx="http://www.springframework.org/schema/tx"
  34. xmlns:aop="http://www.springframework.org/schema/aop"
  35. xsi:schemaLocation="
  36. http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  37. http://www.springframework.org/schema/txhttp://www.springframework.org/schema/tx/spring-tx-3.0.xsd
  38. http://www.springframework.org/schema/aophttp://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
  39. <beanid="dataSource"class="org.springframework.jdbc.datasource.DriverManagerDataSource">
  40. <propertyname="driverClassName"><value>com.microsoft.sqlserver.jdbc.SQLServerDrivervalue>property>
  41. <propertyname="url"><value>jdbc:sqlserver://10.1.100.215:1433;DatabaseName=emailvalue>property>
  42. <propertyname="username"><value>devvalue>property>
  43. <propertyname="password"><value>12345678aAvalue>property>
  44. bean>
  45. <beanid="sessionFactory"class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
  46. <propertyname="dataSource"><reflocal="dataSource"/>property>
  47. <propertyname="packagesToScan"value="isc.java.*"/>
  48. <propertyname="hibernateProperties">
  49. <props>
  50. <propkey="hibernate.dialect">org.hibernate.dialect.SQLServerDialectprop>
  51. <propkey="hibernate.show_sql">trueprop>
  52. <propkey="hibernate.format_sql">trueprop>
  53. props>
  54. property>
  55. bean>
  56. <tx:annotation-driven/>
  57. <beanid="transactionManager"class="org.springframework.orm.hibernate3.HibernateTransactionManager">
  58. <propertyname="sessionFactory"><reflocal="sessionFactory"/>property>
  59. <qualifiervalue="demoApp"/>
  60. bean>
  61. beans>

 

你可能感兴趣的:(smartcleint,demo)