IntelliJ + Tomcat + Spring-Loaded

前端 未结 2 1376
南方客
南方客 2020-12-15 23:58

I would like to try out Spring Source\'s \"Spring Loaded\" class reloading agent, with Tomcat run via IntelliJ.

https://github.com/SpringSource/spring-loaded

<
相关标签:
2条回答
  • 2020-12-16 00:40

    If you added the following jvm parameters (as described at the springloaded page) to your tomcat

    -javaagent:<pathTo>/springloaded-{VERSION}.jar -noverify SomeJavaClass
    

    you should be fine. It may help to disable auto reloading in tomcat for the webapp you are testing. For exmaple in your server.xml:

    <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
        <Context docBase="projekt" path="/projekt" reloadable="false" ...
    

    This ensures that only the springloaded classloader loads changed classes.

    0 讨论(0)
  • 2020-12-16 00:58

    spring loaded cannot hotswap jars.

    Put web fragment output into webapp/WEB-INF/classes

    Also spring loaded support only spring 4.1 https://github.com/spring-projects/spring-loaded/issues/139

    0 讨论(0)
提交回复
热议问题