SpringBoot几乎集成了SpringMVC的所有内容,以及tomcat容器,同时去除了繁复的xml配置文件,开发起来十分方便;页面配合thymeleaf模板渲染也是非常简单,如果是前后端分离的项目,那么SpringBoot就专门负责提供restful风格的api接口,通过json格式与前端进行数据交互。
下面pom.xml里面一些依赖
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.test</groupId> <artifactId>demo</artifactId> <version>0.0.1-SNAPSHOT</version> <modules> <module>common</module> <module>web</module> </modules> <packaging>pom</packaging> <name>demo</name> <description>a project for Spring Boot</description> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.5.1.RELEASE</version> <relativePath/> </parent> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <java.version>1.8</java.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-logging</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency> <dependency> <groupId>org.apache.tomcat</groupId> <artifactId>tomcat-jdbc</artifactId> <version>7.0.47</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> <version>4.3.6.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>4.3.6.RELEASE</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> </dependency> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>1.1.1</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>1.0.19</version> </dependency> <dependency> <groupId>net.sf.json-lib</groupId> <artifactId>json-lib</artifactId> <version>2.4</version> <classifier>jdk15</classifier> <exclusions> <exclusion> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>commons-httpclient</groupId> <artifactId>commons-httpclient</artifactId> <version>3.0.1</version> </dependency> <!--log4j2--> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-slf4j-impl</artifactId> <version>2.4.1</version> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-api</artifactId> <version>2.4.1</version> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> <version>2.4.1</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.7.12</version> </dependency> </dependencies> <build> <finalName>demo</finalName> <resources> <resource> <directory>src/main/resources</directory> <excludes> <exclude>application-dev.properties</exclude> <exclude>application-prod.properties</exclude> <exclude>application.properties</exclude> </excludes> <filtering>true</filtering> </resource> <resource> <filtering>true</filtering> <directory>src/main/resources</directory> <includes> <include>application-${environment}.properties</include> <include>application.properties</include> </includes> </resource> </resources> </build> <profiles> <profile> <id>dev</id> <properties> <environment>dev</environment> </properties> <activation> <activeByDefault>true</activeByDefault> </activation> </profile> <profile> <id>prod</id> <properties> <environment>prod</environment> </properties> </profile> </profiles></project>
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
软考中级精品资料免费领
- 历年真题答案解析
- 备考技巧名师总结
- 高频考点精准押题
- 资料下载
- 历年真题
193.9 KB下载数265
191.63 KB下载数245
143.91 KB下载数1142
183.71 KB下载数642
644.84 KB下载数2755
相关文章
发现更多好内容猜你喜欢
AI推送时光机SpringBoot框架搭建教程分享
后端开发2023-05-31
怎么搭建github(教程分享)
后端开发2023-10-22
eclipse如何搭建springboot框架
后端开发2023-10-08
怎么安装vue框架(教程分享)
后端开发2023-05-14
Spring Boot快速搭建Spring框架教程
后端开发2023-05-31
Python中Scrapy框架的入门教程分享
后端开发2023-03-10
Windows上怎么搭建GitLab(教程分享)
后端开发2023-10-22
idea搭建ssh框架的超详细教程
后端开发2024-04-02
教你用Python3+mysql8.0搭建Django框架
后端开发2024-04-02
图文详解PHP环境搭建教程分享
后端开发2023-06-05
教你快速搭建一个springMVC框架
后端开发2023-05-31
springboot]logback日志框架配置教程
后端开发2024-04-02
Vue前端框架搭建过程
后端开发2024-04-02
golang beego框架环境搭建过程
后端开发2024-04-02
Springboot项目的搭建教程(分离出common父依赖)
后端开发2024-04-02
python miniWeb框架搭建过程详解
后端开发2024-04-02
最全面的SpringBoot教程(五)——整合框架
后端开发2023-09-08
SpringBoot从繁至简的框架基础教程
后端开发2022-11-13
快速搭建一个SpringBoot项目(纯小白搭建教程)
后端开发2024-04-02
SpringBoot整合Shiro的环境搭建教程
后端开发2022-12-19
咦!没有更多了?去看看其它编程学习网 内容吧