jeesite下载及配置

环境:jdk1.8、mysql5.7

从官方提供的路径下载jeesite模板:git clone https://gitee.com/thinkgem/jeesite4.git

将模板改为项目名,并在pom.xml中artifactId也改为项目名

通过mvn导入项目

创建数据库和用户(如果自定义数据库名字,在url中也要做更改)

set global read_only=0;

set global optimizer_switch='derived_merge=off';

create user 'clay'@'%' identified by '123456';

create database jeesite DEFAULT CHARSET utf8 COLLATE utf8_general_ci;  

grant all privileges on jeesite.* to 'clay'@'%' identified by '123456';

flush privileges;

在application.yml文件中数据库配置


  # Mysql 数据库配置

  type: mysql

  driver: com.mysql.jdbc.Driver

  url: jdbc:[mysql://127.0.0.1:3306/jeesite?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull](mysql://127.0.0.1:3306/jeesite?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull)

  username: clay

  password: 123456

  testSql: SELECT 1

设置你的服务端端口号和path


server:

  port: 8980

  servlet:

    context-path: /clay

  tomcat:

    uri-encoding: UTF-8

找到com.jeesite.test.InitCoreData.java,vm options中添加“-Djeesite.initdata=true“参数,运行,生成数据库

通过application.yml运行项目

运行报错maven-surefire-plugin,在pom.xml文件内添加以下plugin




              org.apache.maven.plugins

              maven-surefire-plugin

              2.4.2

              

              true

              


运行服务报错将Spring Boot中scope设置为compile




            org.springframework.boot

            spring-boot-starter-tomcat

            compile


这个时候通过你的ip+端口号+path就能进入jeesite系统页面(系统默认设置超级管理员用户名:system,密码:admin)

使用”研发工具-代码生成工具-新增“导入你数据库里面你想要的表,就会自动生成dao,entity,service和controller了

你可能感兴趣的:(jeesite下载及配置)