SpringBoot热部署报错(BeanCreationException: Error creating bean with name 'classPathFileSystemWatcher' d)
springboot热部署配置方法
http://blog.csdn.net/pyfysf/article/details/78791292
异常信息如下
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'classPathFileSystemWatcher' defined in class path resource [org/springframework/boot/devtools/autoconfigure/LocalDevToolsAutoConfiguration$RestartConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.devtools.classpath.ClassPathFileSystemWatcher]: Factory method 'classPathFileSystemWatcher' threw exception; nested exception is java.lang.IllegalArgumentException: Folder 'E:\project\java_idea_work\HonHuiSchoolApp_server\src\main\java' must exist and must be a directory
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:314)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151)
at com.stylefeng.guns.GunsApplication.main(GunsApplication.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.devtools.classpath.ClassPathFileSystemWatcher]: Factory method 'classPathFileSystemWatcher' threw exception; nested exception is java.lang.IllegalArgumentException: Folder 'E:\project\java_idea_work\HonHuiSchoolApp_server\src\main\java' must exist and must be a directory
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
... 23 common frames omitted
Caused by: java.lang.IllegalArgumentException: Folder 'E:\project\java_idea_work\HonHuiSchoolApp_server\src\main\java' must exist and must be a directory
at org.springframework.util.Assert.isTrue(Assert.java:92)
at org.springframework.boot.devtools.filewatch.FileSystemWatcher.addSourceFolder(FileSystemWatcher.java:124)
at org.springframework.boot.devtools.autoconfigure.LocalDevToolsAutoConfiguration$RestartConfiguration.newFileSystemWatcher(LocalDevToolsAutoConfiguration.java:159)
at org.springframework.boot.devtools.autoconfigure.LocalDevToolsAutoConfiguration$RestartConfiguration.access$000(LocalDevToolsAutoConfiguration.java:101)
at org.springframework.boot.devtools.autoconfigure.LocalDevToolsAutoConfiguration$RestartConfiguration$1.getFileSystemWatcher(LocalDevToolsAutoConfiguration.java:142)
at org.springframework.boot.devtools.classpath.ClassPathFileSystemWatcher.<init>(ClassPathFileSystemWatcher.java:61)
at org.springframework.boot.devtools.autoconfigure.LocalDevToolsAutoConfiguration$RestartConfiguration.classPathFileSystemWatcher(LocalDevToolsAutoConfiguration.java:119)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
... 24 common frames omitted
application.yml配置–这样配置启动服务器之后会报上面的异常
################### spring配置 ###################
spring:
devtools:
restart:
enabled: true #是否开启开发者工具(true/false)
additional-paths: src/main/java
exclude: static/**,WEB-INF/view/**
解决方法
修改application.yml文件
spring:
devtools:
restart:
enabled: true #是否开启开发者工具(true/false)
#additional-paths: src/main/java
exclude: static/**,WEB-INF/view/**
- 注释这个配置即可#additional-paths: src/main/java
Springboot热部署的配置方法连接门—>
http://blog.csdn.net/pyfysf/article/details/78791292
SpringBoot热部署报错(BeanCreationException: Error creating bean with name 'classPathFileSystemWatcher' d)的更多相关文章
- 单点登录(五)-----遇到问题-----cas server 源码部署tomcat运行报错BeanCreationException:Error creating bean with name 's
我们在上一篇文章已经解决了把下载好的cas server源码部署到tomcat缺少子项目编辑文件或者jar包导致找不到class报错的问题 单点登录(四)-----遇到问题-----cas serve ...
- BeanCreationException: Error creating bean with name 'classPathFileSystemWatcher'之解决办法
错误关键信息: BeanCreationException: Error creating bean with name 'classPathFileSystemWatcher' 错误原因:Idea不 ...
- Spring Boot2.1.7启动zipkin-server报错:Error creating bean with name 'armeriaServer' defined in class path
修改项目,更新组件版本时,引入了最新版本2.12.9的zipkin-server和zipkin-autoconfigure-ui时,服务启动报错: org.springframework.beans. ...
- Java报错:Error creating bean with name 'testController': Injection of resource dependencies failed
报错如下: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testCo ...
- MyBatis笔记----报错:Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/ij34/mybatis/applicationContext.xml]: Invocation of init method failed; nested exception is org.sp
四月 05, 2017 4:51:02 下午 org.springframework.context.support.ClassPathXmlApplicationContext prepareRef ...
- Linux:Tomcat报错: Error creating bean with name 'mapScheduler' defined in ServletContext resource 的解决方法
2013-12-31 14:22:28 [ERROR] [ContextLoader.java->initWebApplicationContext(220) Context initializ ...
- Spring Boot 报错:Error creating bean with name 'entityManagerFactory' defined in class path resource
spring boot 写一个web项目,在使用spring-data-jpa的时候,启动报如下错误: Error starting ApplicationContext. To display th ...
- Spring 报错:Error creating bean with name
org.springframework.beans.factory.BeanCreationException: 原因是在autowire时,找不到相应的类,上述问题是因为XXXXX的实现类中没有加相 ...
- Spring AOP 报错org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'XXXXXX' defined in class path resource..........
完整报错如下: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'befo ...
随机推荐
- Qt5.5.0在Linux下静态编译(加上-fontconfig编译项才能显示中文) good
测试系统环境:Ubuntu12.04 (32bit/64bit)编译软件环境:QT5.5.0 本文章主要介绍Linux下QT静态编译环境的搭建,以及如何编译我们的程序board_driver. 1 ...
- 2016最受欢迎国产开源软件评选,2016 年度开源中国新增开源软件排行榜 TOP 100
http://www.oschina.net/news/80154/2016-cn-open-source-software-top http://www.oschina.net/project/to ...
- 联想笔记本进入不了BIOS的解决方法
当计算机遇到问题时,很多情况下需要进入BIOS进行解决.但很多新出的联想笔记本电脑在开机时,无论怎么疯狂的按F2,Fn+F2,F12或者Del,都无法进入BIOS,十分气人. 这种现象出现的原因是联想 ...
- Spring Boot配置篇(基于Spring Boot 2.0系列)
1:概述 SpringBoot支持外部化配置,配置文件格式如下所示: properties files yaml files environment variables command-line ar ...
- ES 20 - 查询Elasticsearch中的数据 (基于DSL查询, 包括查询校验match + bool + term)
目录 1 什么是DSL 2 DSL校验 - 定位不合法的查询语句 3 match query的使用 3.1 简单功能示例 3.1.1 查询所有文档 3.1.2 查询满足一定条件的文档 3.1.3 分页 ...
- C#中await/async闲说
自从C#5.0增加异步编程之后,异步编程越来越简单,async和await用的地方越来越多,越来越好用,只要用异步的地方都是一连串的异步,如果想要异步编程的时候,需要从底层开始编写,这样后边使用的时候 ...
- 03- 基本的SQL语句介绍
01 库的操作新增库create database db1 charset utf8; # 由于在my.ini中已经配置了字符集,所以,charset utf8可以不写 查库# 查看当前创建的数据库s ...
- yii框架多文件上傳
//控制器層 <?phpnamespace app\controllers; use app\models\Uploads;use Yii;use yii\web\Controller;use ...
- 【数据结构--二叉树】Java递归实现二叉树遍历
参考链接:https://www.cnblogs.com/yaobolove/p/6213936.html 这有一棵树: 1.节点对象 package com.tree.mybinarytree; / ...
- 给定一个整数数组和一个目标值,找出数组中和为目标值的两个数 例如给定nums = [2,7,11,15],target = 9
python解决方案 nums = [1,2,3,4,5,6] #假如这是给定的数组 target = 9 #假如这是给定的目标值 num_list = [] #用来装结果的容器 def run(nu ...