简体   繁体   English

本地开发设置

[英]Local development setup

I'm currently looking into what better ways there are for deploying/setting up webapps locally after code changes and database changes. 我目前正在研究在代码更改和数据库更改之后在本地部署/设置Web应用程序的更好方法。

So far I've seen the following tools/ways come by, and attempted each of them: 到目前为止,我已经看到了以下工具/方法,并尝试了每种工具/方法:

  1. ANT build target that compiles, makes a jar, a war file and deploys that to the tomcat folder ANT编译,编译,制作jar,war文件并将其部署到tomcat文件夹的构建目标
  2. Gradle build in combination with the tomcat plugin, which already does a bit of a better job than option #1 将Gradle构建与tomcat插件结合使用,该插件已经比选项#1做得更好
  3. Good ol' fashioned command line 不错的老式命令行
  4. Setup run configuration within Intellij to do the deployment for you 在Intellij中设置运行配置以为您进行部署
  5. Write shell script and call this via command line (haven't tried this) 编写shell脚本并通过命令行调用它(还没有尝试过)

To be honest I'm not finding each of these the ideal solution. 老实说,我找不到所有理想的解决方案。 I find option #4 the easiest as it allows me to, via a short-cut, easily deploy my changes and continue. 我发现选项4最简单,因为它允许我通过快捷方式轻松部署更改并继续。 This has however not given me an option for database changes yet, probably just me that missed it. 但是,这还没有给我提供数据库更改的选项,可能只是我错过了它。

My question is mainly what tools/ways are you guys using in order to achieve an easy and maintainable development environment? 我的问题主要是你们为了实现一个易于维护的开发环境而使用了哪些工具/方式? What considerations come with those? 这些有哪些考虑因素?

Well, let me tell you what I do for local web app setup. 好吧,让我告诉您我对本地Web应用程序设置的操作。

In your favorite IDE(eclipse in my case) i'll configure the application server plugin(tomcat or webpshere) from Eclipse marketplace. 在您最喜欢的IDE(以我为例)中,我将配置Eclipse市场中的应用程序服务器插件(tomcat或webpshere)。

This setup will help to auto publish code changes to the server whenever I make a change in the application. 每当我在应用程序中进行更改时,此设置将有助于将代码更改自动发布到服务器。 I use Maven build tool for the application packaging. 我将Maven构建工具用于应用程序打包。 However I'm not sure about the database side. 但是我不确定数据库方面。

For the people that were wondering how I ended up doing and found the best to work for me. 对于那些想知道我最终会如何做并找到最适合我的人。

I currently have configured my IntelliJ IDE in such a way that the tomcat instance is linked and can be properly controlled and deployed, including debug, from within IntelliJ itself. 目前,我已经以这样的方式配置了IntelliJ IDE:可以链接tomcat实例,并且可以从IntelliJ本身中对其进行适当的控制和部署,包括调试。 This allows me to, via an easy shortcut, instantly populate any resources changes (css, javascript, front end) or redeploy or even restart the server. 这使我能够通过简单的快捷方式立即填充所有资源更改(css,javascript,前端)或重新部署甚至重新启动服务器。 Especially with a small application this works very well. 尤其是在小型应用程序中,这非常有效。

It is yet to be determined whether this would still work with a multi-module setup and a larger project size. 尚不确定这是否仍适用于多模块设置和更大的项目规模。

Should you want more information on how this configuration can be achieved, feel free to send me a direct message. 如果您想了解有关如何实现此配置的更多信息,请随时给我直接发送消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM