gwt 2.7 maven项目必须是多模块的吗? [英] Does gwt 2.7 maven project must be multi moduled?

查看:92
本文介绍了gwt 2.7 maven项目必须是多模块的吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不记得我在哪里发现了红色,对于 gwt 2.7.0 sdk maven模块必须包含3个子模块: server 共享客户

但是在github上,我看到了2.7的不同项目



任何人都可以回答我这个问题吗?

  • server 中的代码 - 在servlet容器中运行(例如访问数据库)

  • shared 中的代码 - 可用于客户端和服务器代码库(例如DTOs - 数据传输对象) 客户端
  • strong> - 将被编译为JavaScript并运行在浏览器中

    所以你必须自己决定你需要多少模块。如果您的代码是一个不与服务器通信的简单小部件,则只需客户端模块


    I don't remember where I've red that, for gwt 2.7.0 sdk maven module must consist of 3 submodules: server, shared and client.

    But on github I've seen different projects for 2.7

    Can any one can answer me this question?

    解决方案

    1. Code in server - runs in servlet container (for example access to DB)
    2. Code in shared - can be used in client and in server codebase (for example DTOs - data transfer objects)
    3. Code in client - will be compiled to JavaScript and runs in browser

    So you must decide yourself how much modules you need. If you code is a simple widget that does not communicate with server, you need only client module

    这篇关于gwt 2.7 maven项目必须是多模块的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆