Browse Source

run with local h2

liuyanming.lym 3 months ago
parent
commit
ab738d9d88
3 changed files with 14 additions and 2 deletions
  1. 6 0
      README.md
  2. 2 2
      pom.xml
  3. 6 0
      src/main/resources/data.sql

+ 6 - 0
README.md

@@ -1,5 +1,9 @@
 ## 码问
 
+# 更新:
+**支持本地部署**:下载后直接运行,自动激活h2内存数据库
+访问 http://localhost:8887 即可,另外可以访问 http://localhost:8887/h2-console 访问数据库,不需要安装启动 mysql 等
+
 ## 在线演示地址
 [https://www.mawen.co](https://www.mawen.co),任何配置、使用和答疑问题,可以 👉[点击](#联系我) 联系我,也可以拉你进群沟通。
 
@@ -134,6 +138,8 @@ mvn -Dmybatis.generator.overwrite=true mybatis-generator:generate
 |  ![](https://mawen-cdn.cn-bj.ufileos.com/wxdyh-qr.jpeg?iopcmd=thumbnail&type=1&scale=50)   |   ![](http://mawen-cdn.cn-bj.ufileos.com/wechat.jpeg?iopcmd=thumbnail&type=1&scale=50)  |
 
 
+pom.xml 特殊字符
+
 &  &
 <  &lt;
 >  &gt;

+ 2 - 2
pom.xml

@@ -27,8 +27,8 @@
                 <db.password>123</db.password>
                 <db.driver>org.h2.Driver</db.driver>
                 <db.schema>classpath:schema.sql</db.schema>
-<!--                <db.data>classpath:data.sql</db.data>-->
-                <db.schema></db.schema>
+                <!--                <db.schema></db.schema>-->
+                <!--                <db.data>classpath:data.sql</db.data>-->
                 <db.data></db.data>
                 <db.initialization-mode>always</db.initialization-mode>
                 <db.continue-on-error>false</db.continue-on-error>

+ 6 - 0
src/main/resources/data.sql

@@ -0,0 +1,6 @@
+insert into ad (id, title, url, image, gmt_start, gmt_end, gmt_create, gmt_modified, status, pos)
+values (1, 'shoulder-framework 高效安全的SpringBoot插件', 'https://gitee.com/ChinaLym/shoulder-framework', 'https://cdn.jsdelivr.net/gh/ChinaLym/shoulder-framework/.idea/icon.png', 1704042061000, 2704042061000, 1704042061000,1704042061000, 1,'NAV')
+     , (2, 'shoulder-framework 高效安全的SpringBoot插件', 'https://gitee.com/ChinaLym/shoulder-framework', 'https://cdn.jsdelivr.net/gh/ChinaLym/shoulder-framework/.idea/icon.png', 1704042061000, 2704042061000, 1704042061000,1704042061000, 1,'SIDE')
+     , (3, 'shoulder-framework 高效安全的SpringBoot插件', 'https://gitee.com/ChinaLym/shoulder-framework', 'https://cdn.jsdelivr.net/gh/ChinaLym/shoulder-framework/.idea/icon.png', 1704042061000, 2704042061000, 1704042061000,1704042061000, 1,'HEADER')
+     , (4, 'shoulder-framework 高效安全的SpringBoot插件', 'https://gitee.com/ChinaLym/shoulder-framework', 'https://cdn.jsdelivr.net/gh/ChinaLym/shoulder-framework/.idea/icon.png', 1704042061000, 2704042061000, 1704042061000,1704042061000, 1,'FOOTER')
+;