摘要: 数据库的事务操作其实就是一组原子性的操作,要么全部操作成功,要么全部操作失败。 比如说我需要对外销售1张电影票,且登记一下销售信息到另一个表,至少需要以下3个步骤 1.查询电影票数量是否满足销售1张电影票 SELECT remain_count F... 阅读全文
posted @ 2019-03-14 23:44 strawqqhat 阅读(108) 评论(0) 推荐(0) 编辑
摘要: java创建线程的三种方式及其对比一、Java中创建线程主要有三种方式:1、继承Thread类创建线程类(1)定义Thread类的子类,并重写该类的run方法,该run方法的方法体就代表了线程要完成的任务。因此把run()方法称为执行体。(2)创建Thread子类的实... 阅读全文
posted @ 2019-03-14 23:42 strawqqhat 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 结合简单示例和UML图,讲解工厂模式简单原理。一、引子话说十年前,有一个爆发户,他家有三辆汽车(Benz(奔驰)、Bmw(宝马)、Audi(奥迪)),还雇了司机为他开车。不过... 阅读全文
posted @ 2019-03-14 23:31 strawqqhat 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 课程介绍Spring Cloud 是一套完整的微服务解决方案,基于 Spring Boot 框架,准确的说,它不是一个框架,而是一个大的容器,它将市面上较好的微服务框架集成进来,从而简化了开发者的代码量。本课程由浅入深带领大家一步步攻克 Spring Cloud 各大... 阅读全文
posted @ 2019-03-14 23:22 strawqqhat 阅读(567) 评论(0) 推荐(0) 编辑
摘要: 一,spring AOPspring boot使用AOP,代码如下,代码比较简单就不细说了,直接上代码,可以使用AOP做日志处理package com.qwrt.fire.sensor.aop; import com.alibaba.fastjson.JSONArra... 阅读全文
posted @ 2019-03-14 23:21 strawqqhat 阅读(350) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-03-14 23:19 strawqqhat 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 学习JavaEE时,经常提到JavaEE三层或者四层结构四层架构展示层(web层)、业务逻辑层、数据访问层、信息资源层。四层架构是在开发企业应用时使用的非常经典的划分模式。web层负责前端展示和用户请求的处理。MVC是一个设计模式,主要用于构建用户页面,目的是把展示逻... 阅读全文
posted @ 2019-03-14 10:55 strawqqhat 阅读(772) 评论(0) 推荐(0) 编辑
#home h1{ font-size:45px; } body{ background-image: url("放你的背景图链接"); background-position: initial; background-size: cover; background-repeat: no-repeat; background-attachment: fixed; background-origin: initial; background-clip: initial; height:100%; width:100%; } #home{ opacity:0.7; } .wall{ position: fixed; top: 0; left: 0; bottom: 0; right: 0; } div#midground{ background: url("https://i.postimg.cc/PP5GtGtM/midground.png"); z-index: -1; -webkit-animation: cc 200s linear infinite; -moz-animation: cc 200s linear infinite; -o-animation: cc 200s linear infinite; animation: cc 200s linear infinite; } div#foreground{ background: url("https://i.postimg.cc/z3jZZD1B/foreground.png"); z-index: -2; -webkit-animation: cc 253s linear infinite; -o-animation: cc 253s linear infinite; -moz-animation: cc 253s linear infinite; animation: cc 253s linear infinite; } div#top{ background: url("https://i.postimg.cc/PP5GtGtM/midground.png"); z-index: -4; -webkit-animation: da 200s linear infinite; -o-animation: da 200s linear infinite; animation: da 200s linear infinite; } @-webkit-keyframes cc { from{ background-position: 0 0; transform: translateY(10px); } to{ background-position: 600% 0; } } @-o-keyframes cc { from{ background-position: 0 0; transform: translateY(10px); } to{ background-position: 600% 0; } } @-moz-keyframes cc { from{ background-position: 0 0; transform: translateY(10px); } to{ background-position: 600% 0; } } @keyframes cc { 0%{ background-position: 0 0; } 100%{ background-position: 600% 0; } } @keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } } @-webkit-keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } } @-moz-keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } } @-ms-keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } }