# derby-demo **Repository Path**: asalan570/derby-demo ## Basic Information - **Project Name**: derby-demo - **Description**: SpringBoot整合derby的小demo,用设置密码的功能,使用的是JDBC的方法,主键自增上有一定缺陷(没有正常关闭链接的话,主键自增第二次会+100),换成mybatis应该会解决。 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-04-28 - **Last Updated**: 2022-05-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # derby-demo #### 介绍 SpringBoot整合derby的小demo,有置密码的功能,使用的是JDBC的方法,主键自增上有一定缺陷(没有正常关闭链接的话,主键自增第二次会+100),换成mybatis应该会解决。 比如[这样](https://github.com/269941633/springboot-mybatis-derby.git) 这个项目将 UserMapper 18行 改为@Update("create table sys_user(id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1)primary key,user_name varchar(30) )")即可 #### 软件架构 软件架构说明 #### 安装教程 1. xxxx 2. xxxx 3. xxxx #### 使用说明 1. 先在测试启动类中运行 createTable()方法(前提是不使用firstdb),初始化并创建数据库和表 2. 运行 setPsd()方法,设置账户和密码,然后再到application.properties中将datasource.url=jdbc:derby:firstdb;create=true改为datasource.url=jdbc:derby:firstdb;create=true;user=JACK;password=123456 3. 也可以先不改,你会发现运行增删改查的代码会报错,因为没有指定用户密码。 4. 然后就没了 #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)