springboot笔记(2)springboot-添加对jsp支持
2016-12-18 16:17
525 查看
1、添加依赖
2、配置application.properties文件
其它跟文件一样
<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/maven-v4_0_0.xsd"> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.4.2.RELEASE</version> <!-- <relativePath/>--> <!-- lookup parent from repository --> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>springboot-activiti-web</artifactId> <packaging>war</packaging> <name>springboot-activiti-web</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <java.version>1.8</java.version> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <activiti.version>5.21.0</activiti.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> <version>1.4.2.RELEASE</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <version>1.4.2.RELEASE</version> </dependency> <!--对tomcat支持的依赖 libs--> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-jasper</artifactId> <version>8.5.6</version> <!-- <scope>provided</scope>--> </dependency> <!--对jstl支持的 libs--> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-rest</artifactId> <version>1.4.2.RELEASE</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> <version>1.4.2.RELEASE</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <version>1.4.2.RELEASE</version> <scope>test</scope> </dependency> <!-- mysql连接驱动包--> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.26</version> </dependency> <!--阿里巴巴fastjson解析依赖 libs--> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.5</version> </dependency> </dependencies> <build> <finalName>springboot-activiti-web</finalName> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project>
2、配置application.properties文件
#---------------------配置视图层----------------------------- # 页面默认前缀目录 spring.mvc.view.prefix=/WEB-INF/jsp/ # 响应页面默认后缀 spring.mvc.view.suffix=.jsp #页面向后台传入日期格式化 spring.mvc.date-format="yyyy-MM-dd HH:mm:ss"
其它跟文件一样
相关文章推荐
- 19. Spring Boot 添加JSP支持【从零开始学Spring Boot】
- Spring Boot 添加JSP支持【转】
- Spring boot 添加jsp支持配置
- springboot添加支持jsp
- Springboot-添加对jsp支持
- 19. Spring Boot 添加JSP支持【从零开始学Spring Boot】
- Spring Boot 添加JSP支持【从零开始学Spring Boot】
- (19)Spring Boot 添加JSP支持【从零开始学Spring Boot】
- Spring Boot项目添加jsp支持
- 搭建SpringBoot、Jsp支持学习笔记
- Spring Boot 添加JSP支持
- 19. Spring Boot 添加JSP支持【从零开始学Spring Boot】
- spring boot 学习笔记(二) 构建web支持jsp
- (19)Spring Boot 添加JSP支持【从零开始学Spring Boot】
- (19)Spring Boot 添加JSP支持【从零开始学Spring Boot】
- 详解SpringBoot 添加对JSP的支持(附常见坑点)
- Spring Boot 添加JSP支持
- SpringBoot学习笔记之JSP与freemarker支持
- SpringBoot之十一:添加JSP支持
- Spring Boot 添加JSP支持【从零开始学Spring Boot】