spring-boot下的springloaded 热启动异常:java.lang.NoSuchFieldExcepti 收藏 评论
2015年12月24日

spring-boot配置springloaded遇到这个问题。



<build>
<!--         <defaultGoal>install</defaultGoal> -->        
    <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>springloaded</artifactId>
                        <version>1.2.0.RELEASE</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>


运行:

java -jar target/spring-mvc-0.1.1.jar


前台:

http://localhost:8080/greeting?name=User


报错:

java.lang.NoSuchFieldException: classCache
        at java.lang.Class.getDeclaredField(Class.java:2062)
        at org.springsource.loaded.agent.SpringPlugin.clearCachedIntrospectionRe
sults(SpringPlugin.java:162)
        at org.springsource.loaded.agent.SpringPlugin.reloadEvent(SpringPlugin.j
ava:127)
        at org.springsource.loaded.TypeRegistry.fireReloadEvent(TypeRegistry.jav
a:1767)
        at org.springsource.loaded.ReloadableType.loadNewVersion(ReloadableType.
java:405)
        at org.springsource.loaded.TypeRegistry.loadNewVersion(TypeRegistry.java
:845)
        at org.springsource.loaded.agent.ReloadableFileChangeListener.fileChange
d(ReloadableFileChangeListener.java:51)
        at org.springsource.loaded.agent.Watcher.determineChangesSince(FileSyste
mWatcher.java:235)
        at org.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:219)

原因:


感觉是reload类时比较慢

http://blog.webinno.cn/article/view/137

本文地址:http://blog.webinno.cn/article/view/137

发表于 @ 2015年12月24日 | 浏览2001次| 编辑 |评论(loading... ) | 分享到:QQ空间新浪微博腾讯微博微信

评论列表

发表评论