springboot项目中遇到的bug
启动项目的时候报错
情形一
1.Error starting ApplicationContext.
To display the auto-configuration report re-run your application with 'debug' enabled.
MyBatis 逆向工程生产源码(po、mapper)
什么是mybatis的逆向工程
mybatis官方为了提高开发效率,提高自动对单表生成sql,包括 :mapper.xml、mapper.java、表名.java(po类)
在企业开发中通常是在设计阶段对表进行设计 、创建。
在开发阶段根据表结构创建对应的po类。
mybatis逆向工程的方向:由数据库表 —>java代码
逆向工程 使用配置
运行逆向工程
MyBatis实现SaveOrUpdate
这篇文章主要讲如何通过xml方式实现SaveOrUpdate,但是仍然建议在Service中实现。
例子
select count(*) from country where id = #{id}
update country
se...