e_e
- 浏览: 83900 次
- 性别:
- 来自: 上海
社区版块
- ( 0)
- ( 0)
- ( 0)
最新评论
文章列表
unsupported conversion from date to java.lang.long
正解:date类型换成localdatetime
误解:去掉@builder标签
mysql 读写分离
1. 引入包
com.baomidou
dynamic-datasource-spring-boot-starter
3.5.1
mysql
...
配置mysql日志打印
- 博客分类:
- springboot
# 配置sql打印日志
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.stdoutimpl
logging:
level:
root: info
com.***.telemarket.mapper: trace
引入jar包并配置resources下的logback-spring.xml文件如下
# 配置sql打印日志
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.stdoutimpl
logging:
level:
root: info
com.***.telemarket.mapper: trace
引入jar包并配置resources下的logback-spring.xml文件如下
- 博客分类:
- springboot
@springbootapplication
@enablejpaauditing
public class contractelementapplication extends myapplication implements commandlinerunner {
public static void main(string[] args) {
run(contractelementapplication.class, args);
}
@autowired
private elementdatasourceconfig elementdat ...
- 2019-01-28 10:19
- 浏览 821
- 分类:开源软件
- 博客分类:
- springboot
参考凯发k8国际娱乐官网入口官网:https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html
章节: 24.8.3 merging complex types
application.yml
element-datasource:
config:
service1:
url:
method:
content-type:
service2:
url:
method:
...
- 2019-01-25 23:34
- 浏览 708
- 分类:企业架构
- 博客分类:
- springboot
自定义表或者字段识别机制的前提条件是:springboot本身提供的策略解决不了我们的问题。
//在配置文件中加入这个,暂时还不可以识别大写表,但是列名映射createtime-->create_time
spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.springphysicalnamingstrategy
//如果配置为这个,可以识别表,但是不能将createtime-->create_time
spring.jpa.hiber ...
- 2018-11-21 19:39
- 浏览 2452
- 分类:编程语言
- 博客分类:
- springboot
@controlleradvicepublic class responsedatahandler implements responsebodyadvice { @override public boolean supports(methodparameter returntype, class convertertype) { return true; } @override public object beforebodywrite(object body, methodparameter returntype, mediatype sele ...
- 2018-10-10 14:59
- 浏览 6526
- 分类:企业架构