Java项目模板
我们开始构建一个大型中间层 Java 应用程序(Web 服务等)。我想创建一个模板项目,以便它可以用于任何其他未来的项目。
这是我正在考虑在模板项目中定义的内容:
- 缓存机制(用于查找和其他元信息)
- 异常处理
- 日志记录
- 需要第三方框架(构建、测试、Spring) 还有什么可以包含在这里吗?
我正在寻找有关以下每个领域的专家建议: 1)
- 我在想ehCache,对此有什么评论吗?积极、消极还是替代方案?
- 我不希望开发人员只使用一揽子 try/catch 块......某种机制可以自动捕获这些块并记录它并以我们想要的方式配置。有什么建议吗?
- log4j
- 我想我会选择 Maven、JUnit 和 Spring;还有其他值得考虑的第三方框架吗?我不想讨论maven与ant等,
谢谢,
We are starting to build a large middle tier java application (webservices, etc.,). I want to create a template project, so it can used for any other future projects.
Here is what i am thinking of defining in the template project:
- Caching mechanism (for look up and other meta information)
- Exception handling
- Logging
- Needed third party frameworks (build, test, spring)
any thing else that can be included here?
I am looking for expert suggestions on each of these areas:
1)
- I am thinking ehCache, any comments on this? positives, negatives or alternatives?
- I dont want developers just to use blanket try/catch blocks.. some mechanism to automatically catch those and log it and configure in a way we want. any suggestions?
- log4j
- I think i will go with Maven, JUnit and Spring; any other 3rd party frameworks worth considering? I dont want to discuss maven versus ant, etc.,
Thank you,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
异常处理:如果你选择 spring 框架,那么你会在这方面得到一些帮助,
Log4j:我只想说使用slf4j 抽象
Maven:我认为 Maven 是一个很好的构建工具,我建议您查看 摇篮,由于这是一个新项目,因此可能值得一看
,我还要补充一点,值得投入一些时间 持续集成以及Jenkins或Bamboo等工具
Exception Handling: If you pick spring framework then you would get some help in this regards
Log4j: I would just say use slf4j abstraction
Maven: I think Maven is a good build tool as any, I would recommend you to look into Gradle, Since it is a new project it might be worth while to have a look
I would also add that, It is worth while to invest some time into Continuous Integration and tools like Jenkins or Bamboo