Springside4.0 下载地址 : http://www.springside.org.cn/
Maven3.0.4 下载地址: http://maven.apache.org/download.html (apache-maven-3.0.4-bin.zip)xp版本
- Install JDK 6.0+ and set the JAVA_HOME. 设置 环境系统变量
- Install Maven 3.0.3+ and set the PATH. (如果电脑有代理不能直接联网,请在apache-maven-3.0.4\conf\settings.xml 设置
IE -- 工具 -- 选项 -- 连接 -- 局域网设置 --- 拷贝脚本地址下载下来,找到最后一行return字符串
<proxy> <id>optional</id> <active>true</active> <protocol>http</protocol> <username></username> 无用户名、密码可不填 <password></password> <host>172.16.1.53</host> 代理地址 <port>8080</port> 端口号 <nonProxyHosts>local.net|some.host.com</nonProxyHosts> </proxy>
3. 执行 quick-start.bat 下载maven需要的所有jar包,项目以后需要到的jar包都会从这里引入 settings.xml 默认下载到 C:\Documents and Settings\Administrator\.m2
这里我更改到 <localRepository>D:/springside4/repository</localRepository>
因为我只是自己使用就不加入到项目里了。
有个醒目的quick-start.bat可以全自动运行,但都是标准的maven命令,自己敲一下键盘也可以:
1. 将所有module编译打包安装到Maven的本地仓库: 在modules目录运行mvn install
2. 为示例项目初始化数据库: 在你感兴趣的示例项目目录, 运行mvn antrun:run -Prefresh-db
3. 启动示例项目: 在项目目录运行 mvn jetty:run
如果同时运行多个项目,需要加上不同的端口定义, 如 jetty:run -Djetty.port=8082
运行showcase时注意在MAVEN_OPTS中设置-XX:MaxPermSize=128m, 参照项目里的jetty.bat.
详细参考:https://github.com/springside/springside4/wiki/QuickStart
我是自己敲键盘的,每执行一次命令都会下载一些jar包。等运行完第三步cmd 执行成功,在浏览器执行
http://127.0.0.1:8080/quickstart/login OK 示例项目正确执行!
springside3的 一些注意事项: Action 类名只有开头首字母可大写以及Action开头开些,否则不识别。