2

I'm developing using IntelliJ 11u on a spring mvc application using tomcat.

I tried the maven jetty plugin, but after a few builds I keep getting java permGen issues and then it just hangs. I was told this was because spring uses log4j and it has some sort of leaks?

Anyhow, I'm asking for tips to help fire up a server, tomcat, with my updated code so I can make quick updates and have tomcat reloaded.

Here are my current annoyances with tomcat:

  1. Only code changes seem to get auto-reloaded, if I make changes to my view pages things don't get updated unless I redeploy. The maven jetty plugin seems to map to my view pages directly and I saw updates to my view pages instantly w/o it even redeploying.

  2. if I have more than 1 thing running in intelliJ, like say I have a main program that I run, or a unit test, IntelliJ seems to re-order what gets run in the run drop down menu and also the shortcut keys get changed to the last thing I ran.

  3. I use google chrome, for some reason when I start tomcat it brings firefox to the forefront and opens a new tab each and every time.

If someone can address any or all of the above issues that would be great as I hate this dance I have to go through just to update/redeploy my application. I wish it could just be a consitant method, using shortcuts or automatically without me having to close the tab created in firefox, and then minimizie it, or redploy for a simple view change etc.

4

2 回答 2

7

You should configure IDEA to update classes and resources and enable a checkbox in the Run configuration to do it automatically on frame deactivation.

Browser can be changed in IDEA settings and you can disable opening browser at all in Tomcat Run/Debug configuration.

As for the Run panel tabs order, you can pin tabs using the tab right click menu, in this case they will remain in the Run or Debug panel in the order they were created.

于 2012-04-10T05:46:19.747 回答
1

Look at JRebel if you want an even more productive environment (It costs, but I find it is worth it). As you can see here, http://zeroturnaround.com/jrebel/features/, it increases the types of changes you can hot-swap (no waiting for a build). I am currently evaluating it myself and will probably pick up a full license.

BTW, if you develop in scala (it looks like you're not, but just in case) the plugin is free.

于 2012-04-10T17:58:36.393 回答