- 博客(7)
- 收藏
- 关注
原创 springboot 整合 mybatis 报错: Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException
报错如下: Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.****.mybatis.springboot.mapper.UserMapper' available: expected at least 1 bean whic...
2018-07-26 11:22:05
4911
转载 Spring中@Transactional(rollbackFor = Exception.class)的作用
Spring中的@Transactional(rollbackFor = Exception.class)事务处理,当你的方法中抛出异常时,它会将事务回滚,数据库中的数据将不会改变,也就是回到进入此方法前的状态...
2018-05-30 10:09:15
418
原创 使用阿里云短信通知服务发送短信--工具类
public class AliyunUtils { public static boolean sendSMS(String mobilephone,Integer status) throws ServerException, ClientException { // 设置超时时间-可自行调整 System.setProperty("sun....
2018-05-23 10:31:19
1871
原创 内连接,左连接,右连接,全连接
内连接,左连接,右连接,全连接表T1: 表T2: id name passwd id jifen dengji 1 jack jpw 1 20 3 2 tom tpw 3 50 41,内连接如果想把用户信息、积分、等级都列出来,那么一般会这样写: 普通:select * ...
2018-05-22 15:02:29
378
原创 mysql子查询
1,where型子查询(把内层查询结果当作外层查询的比较条件)#不用order by 来查询最新的商品select goods_id,goods_name from goods where goods_id = (select max(goods_id) from goods);#取出每个栏目下最新的产品(goods_id唯一)select cat_id,goods_id,goods_name f...
2018-05-22 14:51:38
203
原创 having与where的异同
having与where类似,可以筛选数据,where后的表达式怎么写,having后的表达式就怎么写where针对表中的列发挥作用,查询数据having针对查询结果中的列发挥作用,筛选数据#查询本店商品价格比市场价低多少钱,输出低200元以上的商品select goods_id,good_name,market_price - shop_price as s from goods having ...
2018-05-22 14:50:04
431
原创 # 查询状态为321的设备,并且321是该设备的最近的一条记录
SELECT d.device_uuid FROM device_alerm_tbl AS a LEFT JOIN device_tbl d ON d.device_id=a.device_id WHERE NOT EXISTS ( SELECT * FROM device_alerm_tbl ...
2018-02-27 17:55:15
176
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人