安装JPetStore详细步骤

    技术2022-05-11  57

    安装JPetStore详细步骤

    1. 准备工作    JPetStore是一个非常优秀的J2EE开发的例子,现在把其在windows+tomcat+mysql的安装步骤罗列出来,Resin下的安装和Tomcat下几乎相同!(本人假设您的机器上已经配置好JDK,Tomcat,MySQL等),简单介绍一下我的环境,以供参考(MySQL:4.1.12-nt,Tomcat:5.5.9,JDK:1.5.0_03),还有不要忘记java连接MySQL的数据库驱动程序我的为:mysql-connector-java-3.1.4-beta-bin.jar2. 下载JPetStore    打开http://ibatis.apache.org/ ,点击Downloads Binaries, Documentation, Source    或者直接http://prdownloads.sourceforge.net/ibatisjpetstore/iBATIS_JPetStore-4.0.5.zip?download    页面上提供了JPetStore的下载,    当前版本号:4.0.53.  安装    解压缩iBATIS_JPetStore-4.0.5.zip得到iBATIS_JPetStore-4.0.5    用命令提示符进入iBATIS_JPetStore-4.0.5/ddl/mysql目录,然后运行    (注意:把你的mysql路径加入环境变量)    mysql -uroot –p < jpetstore-mysql-schema.sql    mysql -uroot –p < jpetstore-mysql-dataload.sql    mysql -uroot –p < jpetstore-mysql-create-user.sql    以上三个文件分别是创建数据库JPetStore,导入数据,分配权限。    把iBATIS_JPetStore-4.0.5/build/wars下的jpetstore.war复制到Tomcat的Webapps目录下,    接着在看Webapps目录下会出现jpetstore文件夹,    找到该文件夹下WEB-INF/classes/properties目录下的database.properties,    把里面的内容替换成如下:    ####################################    # Database Connectivity Properties    ####################################    driver=com.mysql.jdbc.Driver    url=jdbc:mysql://localhost:3306/jpetstore    username=jpetstore    password=ibatis9977    重启Tomcat,在IE地址栏里输入: http://localhost:8080/jpetstore/ 看到画面了吧?    点击“Enter the Store”看到鹦鹉了吧?再点击测试几个连接,没问题,那好,配置成功!!!


    最新回复(0)