Skip to content
lerry903 edited this page Jun 20, 2018 · 9 revisions

项目简单的使用说明:

1、修改test包下面CodeGenerator类的数据库配置信息和一些其他特殊要求的配置

2、运行CodeGenerator类用以自动生成单表增删改查的RESTful API

3、修改配置文件中的数据库连接信息和数据源监控登录用户名密码。 注意: 数据库密码和监控密码加密

   java -cp maven包地址\org\jasypt\jasypt\1.9.2\jasypt-1.9.2.jar org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI input="你的数据库密码" password=salt值 algorithm=PBEWithMD5AndDES

一些简单的使用示例:

1、findByCondition,查询条件的例子

    Condition condition = new Condition(User.class);
    condition.createCriteria()
        .andEqualTo("username","lerry")
        .andEqualTo("sex",1);
    condition.orderBy("id").desc();
    userService.findByCondition(condition);
    // select * from user where username = 'lerry' and sex = 1 order by id desc;

其他配置:

1、Druid多数据源配置: (查看官方中文文档

其他工具访问地址:

Swagger 访问地址:http://localhost:8080/swagger-ui.html

Druid 访问地址:http://localhost:8080/druid/index.html

Clone this wiki locally