JavaScud | Forum | JIRA | Blog |
  Dashboard > SpringSide > Home > IDESetting
  SpringSide Log In View a printable version of the current page.  
  IDESetting
Added by calvin, last edited by calvin on Oct 11, 2006  (view change)
Labels: 
(None)

   IDE 设定

1.快速自动生成项目文件

   双击build.bat,选择ide,再选择自己使用的ide。(目前只支持IDEA、Eclipse与MyEclipse)

2. 使用生成的项目文件  

生成后的各种IDE的后续动作如下:

  2.1 IDEA

   打开根目录下生成的springside项目文件;

   重新设置一下JDK5 和 Tomcat 5.5的实际目录;

   修改compiler设定,将?*.script 文件(hsqldb的脚本)也加入编译范围。

2.2 Eclipse/MyEclipse

    import->exist project,将/core,/examples/hellworld ,/exaples/bookstore 三个个项目导入。 

    自行在java build path->user_library中,重新为每个library设定jar,原则是为/components的每一个目录 及/tools/test指定一个library,以让项目使用。

    设置JDK5的实际位置,设置Java Complier选项中设置编译level 为JDK5.

3. 自行设定IDE的注意点

   Encoding: UTF-8

   JDK版本号: 5.0

   servlet 版本号: 2.4

   为core, helloworld,bookstore建立独立的project 或 module,并让helloworld与bookstore依赖于core

   *源码目录:*每个项目均有 /resources 和 /src 两个源码目录, class 文件输出在/web/WEB-INF/classes/。

   测试代码目录:/test/unit ,/test/functional 两个测试代码目录。   class文件输出在/target/test/classes。

   依赖Jar:/components 下各目录的jar 。另 /tools/test 存放测试相关的jar 。

   注意: 注意IDE的Encoding一定要配成UTF-8,否则会乱码,而为了支持JDK5.0的泛型等语法,除了选用JDK5外,还要设置编译器的编译等级是JDK5.0,一般在IDE的项目属性,Java Compiler中配置。

对于bookstore例子,生成的MyEclipse项目文件,项目的Web Context-root写成了bookstroe ,应该是bookstore

Posted by Anonymous at Oct 10, 2006 12:57 | Reply To This

已修正,好汉留个名阿。

小弟guangnian0412,持续关注SS2.0中

Posted by Anonymous at Oct 11, 2006 12:22 | Reply To This

生成MyEclipse项目后,
"原则是为/components的每一个目录 及/tools/test指定一个library,以让项目使用"
对于/components/main 应该不要把servlet和jsp两个包包含在内,不然会跟web服务器发生冲突,引起错误。

Posted by Anonymous at Oct 10, 2006 13:12 | Reply To This

如果不含这两个包,如果不包含的话,IDE如果没关联某个web服务器的话会报错,如果包了又很容易被复制到WEB-INF/lib,的确头痛

Site running on a free Atlassian Confluence Open Source Project License granted to WebWork China. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.3 Build:#808 May 29, 2007) - Bug/feature request - Contact Administrators