<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    I want to fly higher
    programming Explorer
    posts - 114,comments - 263,trackbacks - 0
    1.項目地址
        https://github.com/spring-projects/spring-loaded

    2.介紹
        Spring Loaded is a JVM agent for reloading class file changes whilst a JVM is running. It transforms classes at loadtime to make them amenable to later reloading. Unlike 'hot code replace' which only allows simple changes once a JVM is running (e.g. changes to method bodies), Spring Loaded allows you to add/modify/delete methods/fields/constructors. The annotations on types/methods/fields/constructors can also be modified and it is possible to add/remove/change values in enum types.

    3.小試牛刀
        1.下載spring-loaded:    
            http://repo.spring.io/simple/libs-release-local/org/springframework/springloaded/1.2.3.RELEASE/springloaded-1.2.3.RELEASE.jar

        2.代碼示例(eclipse運行)
    package com.mavsplus.example.springloaded;

    import java.util.concurrent.TimeUnit;

    /**
     * <a href="https://github.com/spring-projects/spring-loaded"></a>
     * 
     * @author landon
     * @since 1.8.0_25
     
    */
    public class SpringLoadedExample {

        public static void main(String[] args) throws Exception{
            Reload reload = new Reload();

            while (true) {
                reload.load();
                
                TimeUnit.SECONDS.sleep(3);
            }
        }

        public static class Reload {

            public void load() {
                System.out.println("load!");
            }
        }
    }

        3.運行配置VM arguments

        
            PS:Maven工程,springloaded-1.2.3.RELEASE.jar放在了src/main/resources目錄

            4.運行:
                程序每隔3s輸出load

            5.直接修改load方法的輸出,輸出reload,直接保存即可,神奇的事情出現,我們在未重啟application的情況下,進行了代碼的reload

                





    4.后續會結合源代碼以及更深層次的例子進行剖析

    posted on 2015-06-19 14:35 landon 閱讀(5378) 評論(3)  編輯  收藏 所屬分類: JVMHotSwap

    FeedBack:
    # re: Spring-Loaded 使用Ⅰ-Getting Started
    2015-09-16 16:58 | cero
    我在項目中引入了springloaded之后,處理請求并返回就會報
    java.lang.String cannot be cast to org.springframework.http.MediaType
    這個錯 是為什么呢?  回復  更多評論
      
    # re: Spring-Loaded 使用Ⅰ-Getting Started
    2015-12-03 13:26 | ztr323
    按照上面的設置,為什么沒有反應?代碼改變之后輸出還是原來的?  回復  更多評論
      
    # re: Spring-Loaded 使用Ⅰ-Getting Started
    2015-12-03 14:58 | ztr323
    原來部分jvm版本不行啊  回復  更多評論
      
    主站蜘蛛池模板: 亚洲一卡2卡4卡5卡6卡残暴在线| 亚洲精品伦理熟女国产一区二区| 亚洲日本在线观看| 好湿好大好紧好爽免费视频| 免费福利在线播放| 亚洲国产免费综合| 亚洲AV无码成H人在线观看| 在线精品自拍亚洲第一区| 在线观看亚洲AV日韩AV| 久久久久久久久久免免费精品 | 免费看的黄色大片| 国产精品亚洲mnbav网站| 猫咪免费人成网站在线观看入口| 亚洲视频在线免费观看| 色婷婷亚洲十月十月色天| 五月婷婷在线免费观看| 亚洲午夜精品一区二区麻豆| 永久免费AV无码网站国产| 亚洲国语精品自产拍在线观看 | 久久狠狠爱亚洲综合影院| 无码中文字幕av免费放| 色噜噜的亚洲男人的天堂| 亚洲裸男gv网站| 最近免费最新高清中文字幕韩国| 国产精品亚洲mnbav网站| 国产成人免费ā片在线观看老同学| 国产男女猛烈无遮档免费视频网站 | 最近2019中文字幕免费大全5| 亚洲综合色区在线观看| 亚洲A∨精品一区二区三区下载| 99久久久国产精品免费牛牛四川| 亚洲自偷自偷偷色无码中文| 午夜视频在线免费观看| 亚洲人成伊人成综合网久久久| 亚洲熟妇久久精品| 亚洲一区二区三区无码影院| 一区二区三区观看免费中文视频在线播放 | 一级毛片a女人刺激视频免费 | 免费一级全黄少妇性色生活片| 成人免费无码视频在线网站| 午夜亚洲WWW湿好爽|