在用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>