当前位置:   article > 正文

Spring项目常用依赖_org.springframework:spring-web

org.springframework:spring-web

properties属性

  1. <properties>
  2.         <!--使用utf-8编码-->
  3.         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  4.         <!--web-->
  5.         <spring.version>4.3.14.RELEASE</spring.version>
  6.         <!--数据库相关-->
  7.         <mysql.version>6.0.6</mysql.version>
  8.     </properties>


dependencyManagement

  1. <dependencyManagement>
  2.         <dependencies>
  3.             <dependency>
  4.                 <groupId>org.springframework</groupId>
  5.                 <artifactId>spring-framework-bom</artifactId>
  6.                 <version>${spring.version}</version>
  7.                 <type>pom</type>
  8.                 <scope>import</scope>
  9.             </dependency>
  10.         </dependencies>
  11.     </dependencyManagement>

dependencies

  1. <dependencies>
  2. <dependency>
  3. <groupId>junit</groupId>
  4. <artifactId>junit</artifactId>
  5. <version>4.12</version>
  6. <scope>test</scope>
  7. </dependency>
  8. <dependency>
  9. <groupId>log4j</groupId>
  10. <artifactId>log4j</artifactId>
  11. <version>1.2.17</version>
  12. </dependency>
  13. <!--web-->
  14. <dependency>
  15. <groupId>javax.servlet</groupId>
  16. <artifactId>servlet-api</artifactId>
  17. <version>2.5</version>
  18. <scope>provided</scope>
  19. </dependency>
  20. <dependency>
  21. <groupId>javax.servlet.jsp</groupId>
  22. <artifactId>javax.servlet.jsp-api</artifactId>
  23. <version>2.3.1</version>
  24. <scope>provided</scope>
  25. </dependency>
  26. <dependency>
  27. <groupId>javax.servlet.jsp.jstl</groupId>
  28. <artifactId>javax.servlet.jsp.jstl-api</artifactId>
  29. <version>1.2.1</version>
  30. </dependency>
  31. <dependency>
  32. <groupId>javax.ws.rs</groupId>
  33. <artifactId>javax.ws.rs-api</artifactId>
  34. <version>2.0</version>
  35. </dependency>
  36. <dependency>
  37. <groupId>javax.websocket</groupId>
  38. <artifactId>javax.websocket-api</artifactId>
  39. <version>1.0</version>
  40. </dependency>
  41. <dependency>
  42. <groupId>javax.annotation</groupId>
  43. <artifactId>javax.annotation-api</artifactId>
  44. <version>1.2</version>
  45. </dependency>
  46. <dependency>
  47. <groupId>javax.transaction</groupId>
  48. <artifactId>javax.transaction-api</artifactId>
  49. <version>1.2</version>
  50. </dependency>
  51. <!--Spring-->
  52. <dependency>
  53. <groupId>org.springframework</groupId>
  54. <artifactId>spring-context</artifactId>
  55. </dependency>
  56. <dependency>
  57. <groupId>org.springframework</groupId>
  58. <artifactId>spring-orm</artifactId>
  59. </dependency>
  60. <dependency>
  61. <groupId>org.springframework</groupId>
  62. <artifactId>spring-oxm</artifactId>
  63. </dependency>
  64. <dependency>
  65. <groupId>org.springframework</groupId>
  66. <artifactId>spring-jdbc</artifactId>
  67. <version>5.3.9</version>
  68. </dependency>
  69. <dependency>
  70. <groupId>org.springframework</groupId>
  71. <artifactId>spring-tx</artifactId>
  72. </dependency>
  73. <dependency>
  74. <groupId>org.springframework</groupId>
  75. <artifactId>spring-web</artifactId>
  76. </dependency>
  77. <dependency>
  78. <groupId>org.springframework</groupId>
  79. <artifactId>spring-webmvc</artifactId>
  80. <version>5.3.8</version>
  81. </dependency>
  82. <dependency>
  83. <groupId>org.springframework</groupId>
  84. <artifactId>spring-aop</artifactId>
  85. <version>5.3.9</version>
  86. </dependency>
  87. <dependency>
  88. <groupId>org.springframework</groupId>
  89. <artifactId>spring-test</artifactId>
  90. </dependency>
  91. <!--spring-oxm依赖-->
  92. <dependency>
  93. <groupId>org.codehaus.castor</groupId>
  94. <artifactId>castor-xml</artifactId>
  95. <version>1.4.1</version>
  96. </dependency>
  97. <!--spring-json依赖-->
  98. <dependency>
  99. <groupId>com.fasterxml.jackson.core</groupId>
  100. <artifactId>jackson-databind</artifactId>
  101. <version>2.9.4</version>
  102. </dependency>
  103. <!--<dependency>-->
  104. <!--<groupId>com.fasterxml.jackson.dataformat</groupId>-->
  105. <!--<artifactId>jackson-dataformat-xml</artifactId>-->
  106. <!--<version>2.9.4</version>-->
  107. <!--</dependency>-->
  108. <!--spring-aop依赖-->
  109. <dependency>
  110. <groupId>org.aspectj</groupId>
  111. <artifactId>aspectjweaver</artifactId>
  112. <version>1.8.13</version>
  113. </dependency>
  114. <!--上传文件-->
  115. <dependency>
  116. <groupId>commons-fileupload</groupId>
  117. <artifactId>commons-fileupload</artifactId>
  118. <version>1.3.3</version>
  119. </dependency>
  120. <!--mysql-->
  121. <dependency>
  122. <groupId>mysql</groupId>
  123. <artifactId>mysql-connector-java</artifactId>
  124. <version>8.0.25</version>
  125. </dependency>
  126. <!--druid-->
  127. <!-- https://mvnrepository.com/artifact/com.alibaba/druid -->
  128. <dependency>
  129. <groupId>com.alibaba</groupId>
  130. <artifactId>druid</artifactId>
  131. <version>1.1.9</version>
  132. </dependency>
  133. <!--Mybatis-->
  134. <dependency>
  135. <groupId>org.mybatis</groupId>
  136. <artifactId>mybatis</artifactId>
  137. <version>3.5.2</version>
  138. </dependency>
  139. <dependency>
  140. <groupId>org.mybatis</groupId>
  141. <artifactId>mybatis-spring</artifactId>
  142. <version>2.0.6</version>
  143. </dependency>
  144. <!-- Mybatis Generator -->
  145. <dependency>
  146. <groupId>org.mybatis.generator</groupId>
  147. <artifactId>mybatis-generator-core</artifactId>
  148. <version>1.3.6</version>
  149. <scope>compile</scope>
  150. <optional>true</optional>
  151. </dependency>
  152. <!-- 工具集 -->
  153. <!--操作json-->
  154. <!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
  155. <dependency>
  156. <groupId>com.alibaba</groupId>
  157. <artifactId>fastjson</artifactId>
  158. <version>1.2.47</version>
  159. </dependency>
  160. <dependency>
  161. <groupId>org.projectlombok</groupId>
  162. <artifactId>lombok</artifactId>
  163. <version>1.18.12</version>
  164. <scope>provided</scope>
  165. </dependency>
  166. </dependencies>

Build

  1. <!-- 在build中配置resources,来防止我们资源导出失败的问题-->
  2. <build>
  3. <resources>
  4. <resource>
  5. <directory>src/main/java</directory>
  6. <includes>
  7. <include>**/*.properties</include>
  8. <include>**/*.xml</include>
  9. </includes>
  10. <filtering>false</filtering>
  11. </resource>
  12. <resource>
  13. <directory>src/main/resources</directory>
  14. <includes>
  15. <include>**/*.properties</include>
  16. <include>**/*.xml</include>
  17. </includes>
  18. <filtering>false</filtering>
  19. </resource>
  20. </resources>
  21. </build>

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/327765
推荐阅读
相关标签
  

闽ICP备14008679号