我想使用 spring3.0 和 java 创建一个Web应用程序
我是软件开发新手。所以您可能认为我的问题很愚蠢,对此我感到很抱歉。
我想使用 J2EE 创建一个 Web 应用程序。我计划将 spring 3.0 框架与 hibernate 一起使用。对于视图,我想使用 freemarker 和 batabase,我更喜欢 postgresql。 IDE 我正在使用 eclipse HELIOS。我可以进行编码,但主要问题是开始开发之前的初始配置。那么任何人都可以帮助我如何配置哪些 xml 文件中需要什么代码。我不知道如何配置所有这些东西,我想使用注释和 MVC 模式,所以请任何人知道我如何开始,请回答我... ..
I am new into software development.so may be you think my question is silly and i am sorry for that.
I want to create a web application using J2EE. i am planning to use spring 3.0 framework along with hibernate. for view i want to use freemarker and batabase i prefer postgresql. IDE i am using eclipse HELIOS. i can do the coding but the main problem is initial configuration before starting the development. so can any body help me how to configure what are the code needed in what xml files.I dont know how to configure all these thing i want to use annotation and MVC pattern so please any body know how i start please ans me.....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看来你真的很困惑如何开始,因为我发现你对 Web 应用程序没有太多经验(如果我错了,请纠正我),你需要做的第一件事是了解 Java,特别是 Spring架构是你最好的选择(或者你唯一的选择),有很多更简单的方法来构建Web应用程序,相信我,我喜欢java,但有时它太大了,并且有很多关于构建任何东西(特别是Web应用程序)的选项真是势不可挡。
无论如何,如果您决定采用 Spring 3.x 来构建您的 Web 应用程序,您可能想从基本的典型架构开始,如下所示:
spring实例化的对象
(通常是@Transactional)
和数据访问对象(@Repository)
从哪里开始?
嗯,有很多文档 我必须说 Spring Guy 在这件事上做得非常出色。
关于使用 freemarker 很容易将其与 spring 插入这里是 文章 做到这一点,而且也在官方文档中 集成视图技术。
可以使用的工具
由于您的一切都基于 Spring,Spring Suite 工具 可以做到这一点;)
Seems that you are really confuse about how to start, as i see you don't have that much expierice on web application (correct me if i'm wrong), first thing you need to do if to understand wether Java and specially a Spring architecture is your best options (or your only for that matter), there are a lot of easier way to build web application and trust me i love java but sometimes is just so big and with so many options about building anything (specially webapplication) that is really overwhelming.
Anyway if you are decide it to take a Spring 3.x for building your web application you migh wanna start with the basic a typical architecture like this one:
object instantiated by spring
(usually @Transactional)
and Data Access Objects(@Repository)
Where to Start?
Well there are a lot of documentation i must say that spring guy have done an amazing job on this matter.
About using freemarker is easy to plug it with spring here is an article to do it but also is on the official documentation Integrating View Technologies.
Tools you can use
Since you are basing everything on Spring, Spring Suite Tool can do the trick ;)
这是一个很好的起点:http://static.springsource。 org/docs/Spring-MVC-step-by-step/
它会让您启动并运行一个 Spring MVC 项目,该项目包含您问题中的所有组件
This is a good place to start: http://static.springsource.org/docs/Spring-MVC-step-by-step/
It'll get you up and running with a Spring MVC project which contains all the components in your question
您可能想看看 Matt Raible 的 AppFuse:http://appfuse.org
从“轻量级”版本开始可能是一个好主意,但它确实帮助我在过去开始学习新的框架。因此,使用 Spring、Hibernate 以及您选择的 Web 框架和数据库生成一个(易于部署的)项目将非常容易。
如果你想更接近 Spring,请尝试 http://www.springsource.org/roo
You might want to take a look at AppFuse by Matt Raible: http://appfuse.org
Starting off with the "light" version might be a good idea, but it sure has helped me to get started and learn new frameworks in the past. So generating a (readily deployable) project with Spring, Hibernate and a Web-Framework and Database of your choice will be quite easy.
If you want to stick more closely to Spring, try http://www.springsource.org/roo