jeesite framework construction and configuration

1. Build the environment:

1、这是我的Eclipse、Maven等环境,此步骤略过。
   注意:以前试过jdk1.6以上都可以使用jeesite

write picture description here 
maven recommends using the latest version

2、下载最新版本jeesite源码:

下载地址:
[GitHub/jeesite]

https://github.com/thinkgem/jeesite

下载时注意jeesite的版本,以前先下了一个比较老的版本,结果 “代码自动生成”模块还没有完善~


3、搭建jeesite环境

    step-1:基本运行环境
安装好Eclipse、maven、tomcat(7以上亲测可用)。PS:记得在window>preferences>java>Installed JREs中将jre环境配置成jdk的根目录,因为maven运行时需要jdk的tools.jar等工具支持。

    step-2:修改配置
先不要把jeestie源码导入到eclipse,打开解压后的jeesite目录,找到 jeesite-master\POM.xml文件,打开,修改artifactId节点值为自己所要二次开发的项目名称(此处也可以不改,打包之后导入elipse的名称就是artifactId节点的值)。
示例:

write picture description here

然后,找到jeesite.properties文件(jeesite-master\src\main\resources\jeesite.properties),修改数据库连接池等配置,根据自己的情况而定~
示例:

write picture description here

PS:这里声明一下,一定要注意jdbc.url=jdbc:mysql://localhost:3306/库名。。。。。这里的库名别忘记了更改PS:jeesite默认为MySQL数据库实现,如果需要改为Oracle数据库,请百度~

    step-3:运行eclipse.bat
运行 jeesite-master\bin\eclipse.bat ,第一次运行会等待比较长时间,因为要下载项目依赖的jar包到本地仓库中,等待运行结果为:BUILD SUCCESS!完成当前step!
示例:

Execute the eclipse.bat file 
If an error is reported during the process, it is generally a problem of maven configuration, which Baidu can generally solve~

    step-4:将项目导入eclipse
在Eclipse中Import-->General-->Existing projects into Workingspace,Browse选择jeesite根目录即可,导入项目后,F5刷新整个工程。
等待编译过程。。。

    step-5:执行init-db.bat,初始化数据库
不要在eclipse中运行次文件,在本地文件夹中运行:jeesite-master\db\init-db.bat,不然Maven报错:找不到指定的POM文件,一般会说在D:\,如果你把项目根目录下的POM文件复制一份到报错提示的目录下再执行貌似可以成功,但是不建议这么做!
示例:

run init-db

After the execution is completed, the prompt: BUILD SUCCESSS! That is, the dependent jar package will still be downloaded to the maven local repository during the process. 
At this step, the project running environment has been set up, and the project can be packaged as a war package to run under Tomcat, or it can be directly published to run under tomcat. 
Visit the project home page: 
http://localhost:8080/jeesite-demo (this is the value of the artifactId node configured in step2) 

Super administrator: thinkgem Password: admin 

Visit the homepage

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324816178&siteId=291194637