关于idea的操做,使用maven时包的自动同步

原本是想用springboot的热部署功能的,因此在pom.xml中导入了java

<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-devtools</artifactId>
   <optional>true</optional>
</dependency>

而后没有作有关于它的任何操做了,因而,它是不起做用的,,,因此我没有在乎spring

今天偶然的机会,启动springboot报错了sql

 2017-04-10 16:23:34.188  [ restartedMain:6429 ] - [ WARN ]  Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'memberRightMapper' defined in file [E:\operation\target\classes\com\xin\base\mapper\MemberRightMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NullPointerException
 express

控制台一直循环输出这个,查了半天,终于找到是加了这个包的问题,因而我就想着反正它原来也没有起做用,那就把它删了呗,但是虽然我在配置文件里pom.xml里面把它删了,但是这个错一直有,不愿消失,最后没有办法,删掉了本地仓库的这个包,问题终于解决。后来才知道idea没有默认包同步,也就是说,若是你只在配置里加了jar包,那么它是不起做用的,一样,删除也不起做用。可是它是能够设置自动包同步的,以下apache

若是不设置自动同步,就须要手动同步,在pom.xml文件右键springboot

这样,问题就完美解决了session

相关文章
相关标签/搜索