springBoot微服务框架pom.xml内容(支持jsp)
来源:互联网 发布:c语言编程小程序 编辑:程序博客网 时间:2024/06/05 16:53
在用springBoot开发web项目时,经常会遇到如下2个问题:
1、This application has no explicit mapping for /error, so you are seeing this as a fallback.
2、Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
如上两个问题:
第1个问题出现的原因为pom.xml中没有添加对jsp支持的jar包;
第2个问题出现的原因为pom.xml中没有添加对mybatis支持的jar包;
现将完整pom.xml发布如下(109 ~ 120行):
<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</groupId><artifactId>vshow</artifactId><version>0.0.1-SNAPSHOT</version><packaging>jar</packaging><name>vshow</name><url>http://maven.apache.org</url><properties><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding></properties> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <version>1.5.7.RELEASE</version> <relativePath /> </parent><!-- 用maven打包:进入项目跟目录mvn clean package --><build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><configuration><mainClass>com.App</mainClass><!-- jvmArguments>-Dfile.encoding=UTF-8</jvmArguments> --></configuration><executions><execution><goals><goal>repackage</goal></goals></execution></executions></plugin></plugins></build><dependencies><!-- 构建web project --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!-- https://mvnrepository.com/artifact/postgresql/postgresql --> <dependency> <groupId>postgresql</groupId> <artifactId>postgresql</artifactId> <version>9.0-801.jdbc3</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>1.3.0</version> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.4</version> </dependency> <dependency> <groupId>com.google.zxing</groupId> <artifactId>core</artifactId> <version>2.2</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.4.0</version> </dependency> <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> <version>2.9.7</version> </dependency> <dependency> <groupId>cglib</groupId> <artifactId>cglib</artifactId> <version>2.2.2</version> </dependency> <!-- https://mvnrepository.com/artifact/com.google.guava/guava --> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>23.0</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> <version>4.3.7.RELEASE</version> </dependency> <!-- tomcat支持 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-jasper</artifactId> </dependency> <!-- jsp支持 --> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> </dependency> <!-- https://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starter --> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>1.1.1</version> </dependency> </dependencies></project>
阅读全文
1 0
- springBoot微服务框架pom.xml内容(支持jsp)
- SpringBoot创建项目时候支持JSP的POM.xml文件内容
- springboot微服务搭建(一):搭建springboot框架
- springboot pom.xml
- SpringBoot -- pom.xml文件
- springboot微服务框架10分钟入门
- 粗谈Springboot框架,众所周知Springboot是有spring推出的微服务框架,什么是微服务框架呢!
- springboot之依赖集锦pom.xml(更新中)
- 框架类---springBoot---tomcat启动并支持跳转JSP文件
- 搭建Jenkins+SpringBoot+Docker的微服务持续集成框架
- springboot(九)添加jsp支持
- SpringBoot JSP 支持
- springboot支持jsp页面
- SpringBoot搭建微服务(一)HelloWorld!
- springboot微服务
- springboot构建微服务
- springboot笔记(2)springboot-添加对jsp支持
- SpringBoot微服务之分布式跟踪系统(springboot+zipkin)
- 观察者模式与事件驱动模式实例比较
- Spring MVC中使用 hibernate-validtor进行服务端验证
- Easyui面板的left,top属性,设置当前面板的position
- shell脚本的日常使用
- Python计算文件中单词个数
- springBoot微服务框架pom.xml内容(支持jsp)
- CF 244 C. The Brand New Function 思维(二进制,区间或运算不同结果)
- 移植QT操作系统
- NOIP2011计算系数详解
- throws 和 try-catch的区别
- 【面向JS--分支结构、循环结构】
- qt5编译boost
- mysql索引
- mysql中的length函数相关