Permalink
Browse files

first step

  • Loading branch information...
0 parents commit f9db3d375ab384227fabef82ad662c89e2cee1d9 @villins committed Oct 12, 2012
Showing with 12,108 additions and 0 deletions.
  1. +64 −0 .classpath
  2. +13 −0 .mymetadata
  3. +50 −0 .project
  4. +12 −0 .settings/.jsdtscope
  5. +7 −0 .settings/org.eclipse.jdt.core.prefs
  6. +1 −0 .settings/org.eclipse.wst.jsdt.ui.superType.container
  7. +1 −0 .settings/org.eclipse.wst.jsdt.ui.superType.name
  8. +3 −0 WebRoot/META-INF/MANIFEST.MF
  9. +26 −0 WebRoot/WEB-INF/classes/applicationContext.xml
  10. BIN WebRoot/WEB-INF/classes/com/villins/controller/ArchiveContrller.class
  11. BIN WebRoot/WEB-INF/classes/com/villins/controller/CommentController.class
  12. BIN WebRoot/WEB-INF/classes/com/villins/controller/MiscController.class
  13. BIN WebRoot/WEB-INF/classes/com/villins/controller/PostController.class
  14. BIN WebRoot/WEB-INF/classes/com/villins/dao/BaseDao.class
  15. BIN WebRoot/WEB-INF/classes/com/villins/dao/CommentDao.class
  16. BIN WebRoot/WEB-INF/classes/com/villins/dao/Page.class
  17. BIN WebRoot/WEB-INF/classes/com/villins/dao/PostDao.class
  18. BIN WebRoot/WEB-INF/classes/com/villins/dao/TagDao.class
  19. BIN WebRoot/WEB-INF/classes/com/villins/entity/Comment.class
  20. BIN WebRoot/WEB-INF/classes/com/villins/entity/Post.class
  21. BIN WebRoot/WEB-INF/classes/com/villins/entity/Tag.class
  22. BIN WebRoot/WEB-INF/classes/com/villins/filter/BlogFilter.class
  23. BIN WebRoot/WEB-INF/classes/com/villins/service/BaseService.class
  24. BIN WebRoot/WEB-INF/classes/com/villins/service/CommentService.class
  25. BIN WebRoot/WEB-INF/classes/com/villins/service/PostService.class
  26. BIN WebRoot/WEB-INF/classes/com/villins/service/TagService.class
  27. BIN WebRoot/WEB-INF/classes/com/villins/util/BlogUtil.class
  28. +52 −0 WebRoot/WEB-INF/classes/spring-dao.xml
  29. +37 −0 WebRoot/WEB-INF/classes/spring-service.xml
  30. +1 −0 WebRoot/WEB-INF/classes/user.xml
  31. +33 −0 WebRoot/WEB-INF/jsp/about.jsp
  32. +66 −0 WebRoot/WEB-INF/jsp/addArticle.jsp
  33. +51 −0 WebRoot/WEB-INF/jsp/archives.jsp
  34. +57 −0 WebRoot/WEB-INF/jsp/editArticle.jsp
  35. +103 −0 WebRoot/WEB-INF/jsp/index.jsp
  36. +81 −0 WebRoot/WEB-INF/jsp/showArticle.jsp
  37. +15 −0 WebRoot/WEB-INF/jsp/top.jsp
  38. BIN WebRoot/WEB-INF/lib/IKAnalyzer2012.jar
  39. BIN WebRoot/WEB-INF/lib/antlr-2.7.6.jar
  40. BIN WebRoot/WEB-INF/lib/aopalliance.jar
  41. BIN WebRoot/WEB-INF/lib/aspectjrt.jar
  42. BIN WebRoot/WEB-INF/lib/aspectjweaver.jar
  43. BIN WebRoot/WEB-INF/lib/cglib-nodep-2.1_3.jar
  44. BIN WebRoot/WEB-INF/lib/commons-beanutils-1.7.0.jar
  45. BIN WebRoot/WEB-INF/lib/commons-beanutils-1.8.2.jar
  46. BIN WebRoot/WEB-INF/lib/commons-collections-3.1.jar
  47. BIN WebRoot/WEB-INF/lib/commons-dbcp.jar
  48. BIN WebRoot/WEB-INF/lib/commons-fileupload-1.2.1.jar
  49. BIN WebRoot/WEB-INF/lib/commons-fileupload.jar
  50. BIN WebRoot/WEB-INF/lib/commons-io-1.4.jar
  51. BIN WebRoot/WEB-INF/lib/commons-io.jar
  52. BIN WebRoot/WEB-INF/lib/commons-lang.jar
  53. BIN WebRoot/WEB-INF/lib/commons-logging-1.1.1.jar
  54. BIN WebRoot/WEB-INF/lib/commons-pool.jar
  55. BIN WebRoot/WEB-INF/lib/dom4j-1.6.1.jar
  56. BIN WebRoot/WEB-INF/lib/ehcache-1.5.0.jar
  57. BIN WebRoot/WEB-INF/lib/ezmorph-1.0.3.jar
  58. BIN WebRoot/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.0.Final.jar
  59. BIN WebRoot/WEB-INF/lib/hibernate-validator-4.3.0.CR1.jar
  60. BIN WebRoot/WEB-INF/lib/hibernate-validator-annotation-processor-4.3.0.CR1.jar
  61. BIN WebRoot/WEB-INF/lib/hibernate3.jar
  62. BIN WebRoot/WEB-INF/lib/jackson-all-1.7.6.jar
  63. BIN WebRoot/WEB-INF/lib/javassist-3.12.0.GA.jar
  64. BIN WebRoot/WEB-INF/lib/jboss-logging-3.1.0.CR2.jar
  65. BIN WebRoot/WEB-INF/lib/json-lib-2.4-jdk15.jar
  66. BIN WebRoot/WEB-INF/lib/json_simple-1.1.jar
  67. BIN WebRoot/WEB-INF/lib/jsonplugin-0.34.jar
  68. BIN WebRoot/WEB-INF/lib/jta-1.1.jar
  69. BIN WebRoot/WEB-INF/lib/junit-4.8.2.jar
  70. BIN WebRoot/WEB-INF/lib/lucene-core-3.6.0.jar
  71. BIN WebRoot/WEB-INF/lib/mysql-connector-java-5.1.13-bin.jar
  72. BIN WebRoot/WEB-INF/lib/org.springframework.aop-3.1.1.RELEASE.jar
  73. BIN WebRoot/WEB-INF/lib/org.springframework.asm-3.1.1.RELEASE.jar
  74. BIN WebRoot/WEB-INF/lib/org.springframework.aspects-3.1.1.RELEASE.jar
  75. BIN WebRoot/WEB-INF/lib/org.springframework.beans-3.1.1.RELEASE.jar
  76. BIN WebRoot/WEB-INF/lib/org.springframework.context-3.1.1.RELEASE.jar
  77. BIN WebRoot/WEB-INF/lib/org.springframework.context.support-3.1.1.RELEASE.jar
  78. BIN WebRoot/WEB-INF/lib/org.springframework.core-3.1.1.RELEASE.jar
  79. BIN WebRoot/WEB-INF/lib/org.springframework.expression-3.1.1.RELEASE.jar
  80. BIN WebRoot/WEB-INF/lib/org.springframework.instrument-3.1.1.RELEASE.jar
  81. BIN WebRoot/WEB-INF/lib/org.springframework.instrument.tomcat-3.1.1.RELEASE.jar
  82. BIN WebRoot/WEB-INF/lib/org.springframework.jdbc-3.1.1.RELEASE.jar
  83. BIN WebRoot/WEB-INF/lib/org.springframework.jms-3.1.1.RELEASE.jar
  84. BIN WebRoot/WEB-INF/lib/org.springframework.orm-3.1.1.RELEASE.jar
  85. BIN WebRoot/WEB-INF/lib/org.springframework.oxm-3.1.1.RELEASE.jar
  86. BIN WebRoot/WEB-INF/lib/org.springframework.test-3.1.1.RELEASE.jar
  87. BIN WebRoot/WEB-INF/lib/org.springframework.transaction-3.1.1.RELEASE.jar
  88. BIN WebRoot/WEB-INF/lib/org.springframework.web-3.1.1.RELEASE.jar
  89. BIN WebRoot/WEB-INF/lib/org.springframework.web.portlet-3.1.1.RELEASE.jar
  90. BIN WebRoot/WEB-INF/lib/org.springframework.web.servlet-3.1.1.RELEASE.jar
  91. BIN WebRoot/WEB-INF/lib/org.springframework.web.struts-3.1.1.RELEASE.jar
  92. BIN WebRoot/WEB-INF/lib/poi-3.7-20101029.jar
  93. BIN WebRoot/WEB-INF/lib/slf4j-api-1.6.1.jar
  94. BIN WebRoot/WEB-INF/lib/validation-api-1.0.0.GA.jar
  95. +41 −0 WebRoot/WEB-INF/springMVC-servlet.xml
  96. +62 −0 WebRoot/WEB-INF/web.xml
  97. BIN WebRoot/img/back_top.jpg
  98. BIN WebRoot/img/btn.jpg
  99. BIN WebRoot/img/btn_hover.jpg
  100. BIN WebRoot/img/main_left.jpg
  101. BIN WebRoot/img/mbtn.jpg
  102. BIN WebRoot/img/mbtn_hover.jpg
  103. BIN WebRoot/img/未命名.jpg
  104. +27 −0 WebRoot/index.jsp
  105. +9,404 −0 WebRoot/js/jquery-1.7.2.js
  106. +176 −0 WebRoot/js/kindeditor-min.js
  107. +1 −0 WebRoot/js/main.js
  108. +234 −0 WebRoot/js/zh_CN.js
  109. +149 −0 WebRoot/styles/article.css
  110. +143 −0 WebRoot/styles/main.css
  111. +26 −0 src/applicationContext.xml
  112. +32 −0 src/com/villins/controller/ArchiveContrller.java
  113. +55 −0 src/com/villins/controller/CommentController.java
  114. +44 −0 src/com/villins/controller/MiscController.java
  115. +112 −0 src/com/villins/controller/PostController.java
  116. +224 −0 src/com/villins/dao/BaseDao.java
  117. +28 −0 src/com/villins/dao/CommentDao.java
  118. +116 −0 src/com/villins/dao/Page.java
  119. +47 −0 src/com/villins/dao/PostDao.java
  120. +29 −0 src/com/villins/dao/TagDao.java
  121. +50 −0 src/com/villins/entity/Comment.java
  122. +91 −0 src/com/villins/entity/Post.java
  123. +47 −0 src/com/villins/entity/Tag.java
  124. +35 −0 src/com/villins/filter/BlogFilter.java
  125. +57 −0 src/com/villins/service/BaseService.java
  126. +27 −0 src/com/villins/service/CommentService.java
  127. +31 −0 src/com/villins/service/PostService.java
  128. +27 −0 src/com/villins/service/TagService.java
  129. +30 −0 src/com/villins/util/BlogUtil.java
  130. +52 −0 src/spring-dao.xml
  131. +37 −0 src/spring-service.xml
  132. +1 −0 src/user.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="melibrary.com.genuitec.eclipse.j2eedt.core.MYECLIPSE_JAVAEE_5_CONTAINER"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/IKAnalyzer2012.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/antlr-2.7.6.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/aopalliance.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/aspectjrt.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/aspectjweaver.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cglib-nodep-2.1_3.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-beanutils-1.7.0.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-beanutils-1.8.2.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-collections-3.1.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-dbcp.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-fileupload.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-io.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-lang.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-logging-1.1.1.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-pool.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/dom4j-1.6.1.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/ehcache-1.5.0.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/ezmorph-1.0.3.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.0.Final.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/hibernate-validator-4.3.0.CR1.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/hibernate-validator-annotation-processor-4.3.0.CR1.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/hibernate3.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jackson-all-1.7.6.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/javassist-3.12.0.GA.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jboss-logging-3.1.0.CR2.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/json-lib-2.4-jdk15.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jsonplugin-0.34.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jta-1.1.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/junit-4.8.2.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/lucene-core-3.6.0.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/mysql-connector-java-5.1.13-bin.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/org.springframework.aop-3.1.1.RELEASE.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/org.springframework.asm-3.1.1.RELEASE.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/org.springframework.aspects-3.1.1.RELEASE.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/org.springframework.beans-3.1.1.RELEASE.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/org.springframework.context-3.1.1.RELEASE.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/org.springframework.context.support-3.1.1.RELEASE.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/org.springframework.core-3.1.1.RELEASE.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/org.springframework.expression-3.1.1.RELEASE.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/org.springframework.instrument-3.1.1.RELEASE.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/org.springframework.instrument.tomcat-3.1.1.RELEASE.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/org.springframework.jdbc-3.1.1.RELEASE.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/org.springframework.jms-3.1.1.RELEASE.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/org.springframework.orm-3.1.1.RELEASE.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/org.springframework.oxm-3.1.1.RELEASE.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/org.springframework.test-3.1.1.RELEASE.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/org.springframework.transaction-3.1.1.RELEASE.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/org.springframework.web-3.1.1.RELEASE.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/org.springframework.web.portlet-3.1.1.RELEASE.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/org.springframework.web.servlet-3.1.1.RELEASE.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/org.springframework.web.struts-3.1.1.RELEASE.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/poi-3.7-20101029.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/slf4j-api-1.6.1.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/validation-api-1.0.0.GA.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-fileupload-1.2.1.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-io-1.4.jar"/>
+ <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/json_simple-1.1.jar"/>
+ <classpathentry kind="output" path="WebRoot/WEB-INF/classes"/>
+</classpath>
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-module
+ type="WEB"
+ name="Blog"
+ id="myeclipse.1340600752983"
+ context-root="/Blog"
+ j2ee-spec="5.0"
+ archive="Blog.war">
+ <attributes>
+ <attribute name="webrootdir" value="WebRoot" />
+ </attributes>
+</project-module>
+
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>Blog</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.genuitec.eclipse.ast.deploy.core.deploymentnature</nature>
+ <nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+</projectDescription>
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="src" path="WebRoot"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
@@ -0,0 +1,7 @@
+#Mon Jun 25 13:05:55 CST 2012
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
@@ -0,0 +1 @@
+Window
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - Middle tier application context definition for the image database.
+ -->
+<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"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
+ ">
+
+
+ <!-- 数据访问层配置 -->
+ <import resource="classpath:/spring-dao.xml" />
+ <!--服务层配置 -->
+ <import resource="classpath:/spring-service.xml" />
+
+
+
+
+
+
+
+
+
+</beans>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,52 @@
+<?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:tx="http://www.springframework.org/schema/tx"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:p="http://www.springframework.org/schema/p"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
+ <!-- 扫描com.baobaotao.dao包下所有标注@Repository的DAO组件 -->
+ <context:component-scan base-package="com.villins.dao"/>
+
+
+ <bean id="dataSource"
+ class="org.springframework.jdbc.datasource.DriverManagerDataSource">
+ <property name="driverClassName">
+ <value>com.mysql.jdbc.Driver</value>
+ </property>
+ <property name="url">
+ <value>jdbc:mysql://localhost/blog?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true&amp;autoReconnectForPools=true
+ </value>
+ </property>
+ <property name="username">
+ <value>root</value>
+ </property>
+ <property name="password">
+ <value>hammer</value>
+ </property>
+ </bean>
+
+ <bean id="sessionFactory"
+ class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
+ <property name="dataSource" ref="dataSource" />
+ <property name="packagesToScan">
+ <list>
+ <value>com.villins.entity</value>
+ </list>
+ </property>
+ <property name="hibernateProperties">
+ <value>
+ hibernate.dialect=org.hibernate.dialect.MySQLDialect
+ hibernate.show_sql=true
+ hibernate.format_sql=true
+ hibernate.hbm2ddl.auto=update
+ hibernate.current_session_context_class=thread
+ </value>
+ </property>
+ </bean>
+ <bean id="hibernateTemplate"
+ class="org.springframework.orm.hibernate3.HibernateTemplate"
+ p:sessionFactory-ref="sessionFactory" />
+ </beans>
@@ -0,0 +1,37 @@
+<?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:tx="http://www.springframework.org/schema/tx"
+ xmlns:aop="http://www.springframework.org/schema/aop"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:p="http://www.springframework.org/schema/p"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
+ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
+ <!-- 扫描com.baobaotao.service包下所有标注@Service的服务组件 -->
+ <context:component-scan base-package="com.villins.service"/>
+ <bean id="transactionManager"
+ class="org.springframework.orm.hibernate3.HibernateTransactionManager"
+ p:sessionFactory-ref="sessionFactory" />
+
+ <!--使用强大的切点表达式语言轻松定义目标方法-->
+ <aop:config>
+ <!--通过aop定义事务增强切面-->
+ <aop:pointcut id="serviceMethod"
+ expression="execution(* org.zqu.service.*Service.*(..))" />
+ <!--引用事务增强-->
+ <aop:advisor pointcut-ref="serviceMethod" advice-ref="txAdvice" />
+ </aop:config>
+
+ <!--事务增强-->
+ <tx:advice id="txAdvice" transaction-manager="transactionManager">
+ <!--事务属性定义-->
+ <tx:attributes>
+ <tx:method name="*" />
+ </tx:attributes>
+ </tx:advice>
+ <!-- 基于EHCache的系统缓存管理器-->
+<!-- <bean id="cacheManager" -->
+<!-- class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" -->
+<!-- p:configLocation="classpath:ehcache.xml"/> -->
+</beans>
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?>
@@ -0,0 +1,33 @@
+<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
+<%
+String path = request.getContextPath();
+String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
+%>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <base href="<%=basePath%>">
+
+ <title>My JSP 'about.jsp' starting page</title>
+
+ <meta http-equiv="pragma" content="no-cache">
+ <meta http-equiv="cache-control" content="no-cache">
+ <meta http-equiv="expires" content="0">
+ <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
+ <meta http-equiv="description" content="This is my page">
+ <!--
+ <link rel="stylesheet" type="text/css" href="styles.css">
+ -->
+ <link href="styles/main.css" rel="stylesheet" type="text/css">
+ <link href="styles/article.css" rel="stylesheet" type="text/css">
+ </head>
+
+ <body>
+ <jsp:include page="top.jsp"/>
+ <div class="mian-wrap">
+ <h1>About Me</h1>
+ <p><span class="about">学过ruby,写过java的一软件工程应届生</span></p>
+ </div>
+ </body>
+</html>
@@ -0,0 +1,66 @@
+<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
+<%
+String path = request.getContextPath();
+String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
+%>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <base href="<%=basePath%>">
+
+ <title>My JSP 'addArticle.jsp' starting page</title>
+
+ <meta http-equiv="pragma" content="no-cache">
+ <meta http-equiv="cache-control" content="no-cache">
+ <meta http-equiv="expires" content="0">
+ <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
+ <meta http-equiv="description" content="This is my page">
+ <!--
+ <link rel="stylesheet" type="text/css" href="styles.css">
+ -->
+ <link href="styles/main.css" rel="stylesheet" type="text/css">
+ <link href="styles/article.css" rel="stylesheet" type="text/css">
+
+ </head>
+
+ <body>
+
+ <jsp:include page="top.jsp"/>
+ <br/>
+ <br/>
+ <div class="mian-wrap">
+ <form action="<%=path %>/article/new" method="post" >
+ <div class="row note-title">
+ <label class="field" for="note_title">题目:</label>
+ <div>
+ <input tabindex="1" id="note_title" name="title" type="text" value=""/>
+ </div>
+ </div>
+ <div class="row note-text">
+ <label class="field" for="note_text">正文:</label>
+ <div>
+ <textarea tabindex="2" id="note_text" name="content"></textarea>
+ </div>
+ </div>
+
+ <div class="row note-title">
+ <label class="field" for="note_title">标签:(用逗号分开,不超过五个)</label>
+ <div>
+ <input tabindex="1" id="note_title" name="note_tags" type="text" value=""/>
+ </div>
+ </div>
+
+ <div class="row footer">
+ <div class="error-msg board">
+ </div>
+ <span>
+ <input tabindex="7" id="preview_note" value="预览" type="button" class="button" />
+ </span>
+ &nbsp;
+ <input tabindex="8" id="publish_note" value="发表" type="submit" class="btn" name="note_submit" />
+ </div>
+ </form>
+ </div>
+ </body>
+</html>
Oops, something went wrong. Retry.

0 comments on commit f9db3d3

Please sign in to comment.