h2-console
发表于|更新于
|浏览量:
名枪好躲,暗箭难防。——无名氏
分享一个h2-console的使用方式:
首先配置:
1 | spring: |
然后可以看到日志:

我们访问localhost:8080/h2-console,复制jdbc:h2:mem:2e01066c-fbfb-40a5-8ba9-3ff049d753f8到connection url

进到控制台,并成功连接
这里可以看到我们的库表信息以及进行查询

非常的好用
相关推荐
2023-01-09
byte-buddy
与有肝胆人共事,从无字句处读书。——周恩来 分享一个字节码框架,能在jvm运行时动态加载Class、修改Class 官方文档:https://bytebuddy.net/#/ github:https://github.com/raphw/byte-buddy.git 引入: 12345<dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> <version>1.12.21</version></dependency> 一个简单的Hello World: 123456789Class<?> dynamicType = new ByteBuddy() .subclass(Object.class) .method(ElementMatchers.named("toString")) .intercept(FixedValue.va...
2021-12-17
Thymeleaf Error resolving template [favicon.ico]
每一个看似简单的社会现象其实都只露出了冰山一角。——林达 遇到这个报错,方案1: 在页面上添加: 1<link rel="icon" href="/static/favicon.ico"> 前提是你有icon并且放到了static下面 方案2: 写个过滤器,给它过滤掉 12345678910111213141516171819202122232425262728293031323334353637package com.ruben.simplescaffold.filter;import cn.hutool.core.lang.Opt;import cn.hutool.core.text.CharSequenceUtil;import lombok.extern.slf4j.Slf4j;import org.springframework.stereotype.Component;import javax.servlet.*;import javax.servlet.annotation.WebFilter;import...
2022-10-25
jackson时区问题
万两黄金容易得,知心一个也难求——曹雪芹 今天发现日期数据返回后日期错乱 怀疑是时区问题,果然改了全局jackson序列化配置就好了 12ObjectMapper objectMapper = new ObjectMapper();objectMapper.setTimeZone(TimeZone.getTimeZone("GMT+8")); 完整代码: 12345678910111213141516171819202122232425262728293031323334353637383940/** * web配置类 * * @author <achao1441470436@gmail.com> * @since 2021/5/18 0018 14:52 */@Configuration@EnableWebMvcpublic class WebConfig implements WebMvcConfigurer { /** * @param converters 转换器 * @author <a...
2023-08-19
Delimiter
青春如初春,如朝日,如百卉之萌动,如利刃之新发于硎,人生最宝贵之时期也。青年之于社会,犹新鲜活泼细胞之在身。——陈独秀 分享一下:org.springframework.boot.convert.Delimiter的用法 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950/* * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-...
2023-11-13
webflux中操作符调试
生命不息,奋斗不止。——卡莱尔 分享一个小技巧,在webflux开发中,我们可以在主启动类上加这么一行代码: 1Hooks.onOperatorDebug(); 这行代码的用处是注册一个回调函数,可以打印操作符信息,举个例子: 12345678910111213141516import reactor.core.publisher.Flux;import reactor.core.publisher.Hooks;public class DebugExample { public static void main(String[] args) { Hooks.onOperatorDebug(); // 启用操作符调试 Flux<Integer> flux = Flux.just(1, 2, 3, 4) .map(i -> i / 0); // 这里会触发除以零的异常 flux.subscribe( value -> Syst...
2022-02-26
Files.delete
终点线只是一个记号而已,其实并没有什么意义,关键是这一路你是如何走的。——村上春树 在java中我们除了用这种方式删除文件: 12345678File file = new File("D:\\file\\projects\\img-comparison-demo\\target\\generated-sources");if (file.exists()) { try { boolean delete = file.delete(); } catch (Exception e) { e.printStackTrace(); }} 还可以使用Files工具类: 12345try { boolean delete = Files.deleteIfExists(Paths.get("D:\\file\\projects\\img-comparison-demo\\target\\generated-sources"))...

阿超
我的名字叫阿超 年龄25岁 家在北京市 职业是软件开发 每天最晚也会在八点前回家 不抽烟 酒浅尝辄止 晚上十二点上床 保证睡足八个小时 睡前写一篇博客 再做二十分钟俯卧撑暖身 然后再睡觉 基本能熟睡到天亮 像婴儿一样不留下任何疲劳和压力 就这样迎来第二天的早晨 健康检查结果也显示我很正常 我想说明我是一个不论何时都追求内心平稳的人 不拘泥于胜负 不纠结于烦恼 不树立使我夜不能寐的敌人 这就是我在这社会的生活态度
Follow Me公告
This is my Blog