内容简介:通用 Mapper 4.0.3 已发布,该版本从根本上解决了通用 Mapper 对 devtools 的支持。 但是 https://github.com/abel533/mapper-cast-exception 中列举的特殊情况在目前都不支持(mybatis也支持不了)。 同时 ma...
通用 Mapper 4.0.3 已发布,该版本从根本上解决了通用 Mapper 对 devtools 的支持。
但是 https://github.com/abel533/mapper-cast-exception 中列举的特殊情况在目前都不支持(mybatis也支持不了)。
同时 mapper-spring-boot-starter 发布了 2.0.3。
其他 Spring Boot 类的项目如果想要完美支持 devtools,可以参考本项目的实现。
实现思路很简单,就是在 devtools 重启时,把所有和 Class 有关的缓存全部清空即可。
参考代码:
配置代码:
具体配置代码如下:
/**
* Support Devtools Restart.
*/
@org.springframework.context.annotation.Configuration
@ConditionalOnProperty(prefix = "spring.devtools.restart", name = "enabled", matchIfMissing = true)
static class RestartConfiguration {
@Bean
public MapperCacheDisabler mapperCacheDisabler() {
return new MapperCacheDisabler();
}
}【声明】文章转载自:开源中国社区 [http://www.oschina.net]
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
PHP for the World Wide Web, Second Edition (Visual QuickStart Gu
Larry Ullman / Peachpit Press / 2004-02-02 / USD 29.99
So you know HTML, even JavaScript, but the idea of learning an actual programming language like PHP terrifies you? Well, stop quaking and get going with this easy task-based guide! Aimed at beginning ......一起来看看 《PHP for the World Wide Web, Second Edition (Visual QuickStart Gu》 这本书的介绍吧!