代码拉取完成,页面将自动刷新
@EnableCrudTemplate(
scanPackages = {
"com.github.huifer.mybatis"},
selectByIdMethodName = "selectByPrimaryKey",
deleteByIdMethodName = "deleteByPrimaryKey",
updateByIdMethodName = "updateByPrimaryKeySelective",
insertMethodName = "insertSelective")
<dependency>
<groupId>com.github.huifer</groupId>
<artifactId>common</artifactId>
<version>LAST_VERSION</version>
</dependency>
@CacheKey(key = "issues", type = IssuesEntity.class)
public interface IssuesMapper {}
public class IssuesEntity implements BaseEntity {}
public class IssuesEntity implements BaseEntity {}
@Autowired
private CrudFacade crudFacade;
CrudFacade
组件就可以拥有数据库+缓存的crud操作了. 如果不需要缓存请将mapper上的@CacheKey
删掉@CacheKey
idMethod
为准, 建议填写一个@CacheKey(key = "tt", type = IssuesEntity.class, idFiled = "newTitle", idMethod = "ooo")
public class IssuesEntity {
private Integer id;
private String newTitle;
private String ooo() {
return "OOO" + this.newTitle;
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。