diff --git a/.classpath b/.classpath
new file mode 100644
index 0000000..64f1662
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.project b/.project
new file mode 100644
index 0000000..5a89e97
--- /dev/null
+++ b/.project
@@ -0,0 +1,42 @@
+
+
+ spring-boot-seckill
+
+
+
+
+
+ org.eclipse.wst.jsdt.core.javascriptValidator
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.wst.common.project.facet.core.builder
+
+
+
+
+ org.eclipse.m2e.core.maven2Builder
+
+
+
+
+ org.eclipse.wst.validation.validationbuilder
+
+
+
+
+
+ org.eclipse.jem.workbench.JavaEMFNature
+ org.eclipse.wst.common.modulecore.ModuleCoreNature
+ org.eclipse.jdt.core.javanature
+ org.eclipse.m2e.core.maven2Nature
+ org.eclipse.wst.common.project.facet.core.nature
+ org.eclipse.wst.jsdt.core.jsNature
+
+
diff --git a/.settings/.jsdtscope b/.settings/.jsdtscope
new file mode 100644
index 0000000..585c967
--- /dev/null
+++ b/.settings/.jsdtscope
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..9c4403f
--- /dev/null
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,13 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.7
diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..14b697b
--- /dev/null
+++ b/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component
new file mode 100644
index 0000000..f2e5363
--- /dev/null
+++ b/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..8988a5e
--- /dev/null
+++ b/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.container b/.settings/org.eclipse.wst.jsdt.ui.superType.container
new file mode 100644
index 0000000..3bd5d0a
--- /dev/null
+++ b/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.name b/.settings/org.eclipse.wst.jsdt.ui.superType.name
new file mode 100644
index 0000000..05bd71b
--- /dev/null
+++ b/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window
\ No newline at end of file
diff --git a/.settings/org.eclipse.wst.validation.prefs b/.settings/org.eclipse.wst.validation.prefs
new file mode 100644
index 0000000..6f1cba6
--- /dev/null
+++ b/.settings/org.eclipse.wst.validation.prefs
@@ -0,0 +1,2 @@
+disabled=06target
+eclipse.preferences.version=1
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..372a16b
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,106 @@
+
+ 4.0.0
+ com.itstyle.seckill
+ spring-boot-seckill
+ jar
+ 0.0.1-SNAPSHOT
+ spring-boot-seckill Maven
+ http://maven.apache.org
+
+ UTF-8
+ springboot
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 1.5.10.RELEASE
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+ org.springframework.boot
+ spring-boot-starter-thymeleaf
+
+
+ net.sourceforge.nekohtml
+ nekohtml
+
+
+ org.springframework.boot
+ spring-boot-starter-data-jpa
+
+
+ mysql
+ mysql-connector-java
+
+
+
+ org.springframework.boot
+ spring-boot-starter-redis
+ 1.4.7.RELEASE
+
+
+
+ io.springfox
+ springfox-swagger2
+ 2.7.0
+
+
+ io.springfox
+ springfox-swagger-ui
+ 2.7.0
+
+
+
+ org.redisson
+ redisson
+ 2.11.5
+
+
+ org.apache.commons
+ commons-lang3
+ 3.7
+
+
+
+ org.springframework.kafka
+ spring-kafka
+ 1.3.5.RELEASE
+
+
+
+ org.apache.curator
+ curator-recipes
+ 2.10.0
+
+
+
+ spring-boot-seckill
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+ org.springframework
+ springloaded
+ 1.2.7.RELEASE
+
+
+
+
+
+
diff --git a/src/main/java/com/itstyle/seckill/Application.java b/src/main/java/com/itstyle/seckill/Application.java
new file mode 100644
index 0000000..5d32a9e
--- /dev/null
+++ b/src/main/java/com/itstyle/seckill/Application.java
@@ -0,0 +1,24 @@
+package com.itstyle.seckill;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+/**
+ * 启动类
+ * 创建者 科帮网
+ * 创建时间 2018年5月12日
+ * API接口测试:http://localhost:8080/seckill/swagger-ui.html
+ */
+@SpringBootApplication
+public class Application {
+ private final static Logger LOGGER = LoggerFactory.getLogger(Application.class);
+ /**
+ * 1. 数据库乐观锁;2. 基于Redis的分布式锁;3. 基于ZooKeeper的分布式锁
+ * 4. redis 订阅监听;5.kafka消息队列
+ */
+ public static void main(String[] args) throws InterruptedException {
+ SpringApplication.run(Application.class, args);
+ LOGGER.info("项目启动 ");
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/itstyle/seckill/common/api/SwaggerConfig.java b/src/main/java/com/itstyle/seckill/common/api/SwaggerConfig.java
new file mode 100644
index 0000000..870a336
--- /dev/null
+++ b/src/main/java/com/itstyle/seckill/common/api/SwaggerConfig.java
@@ -0,0 +1,27 @@
+package com.itstyle.seckill.common.api;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.Contact;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+@Configuration
+@EnableSwagger2
+public class SwaggerConfig {
+ @Bean
+ public Docket userApi() {
+ return new Docket(DocumentationType.SWAGGER_2).groupName("秒杀案例").apiInfo(apiInfo()).select()
+ .apis(RequestHandlerSelectors.basePackage("com.itstyle.seckill.web")).paths(PathSelectors.any()).build();
+ }
+ // 预览地址:swagger-ui.html
+ private ApiInfo apiInfo() {
+ return new ApiInfoBuilder().title("Spring 中使用Swagger2构建文档").termsOfServiceUrl("https://blog.52itstyle.com")
+ .contact(new Contact("科帮网 ", "https://blog.52itstyle.com/", "345849402@qq.com")).version("1.1").build();
+ }
+}
diff --git a/src/main/java/com/itstyle/seckill/common/config/IndexController.java b/src/main/java/com/itstyle/seckill/common/config/IndexController.java
new file mode 100644
index 0000000..37bc911
--- /dev/null
+++ b/src/main/java/com/itstyle/seckill/common/config/IndexController.java
@@ -0,0 +1,35 @@
+package com.itstyle.seckill.common.config;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+/**
+ * 通用访问拦截匹配
+ * 创建者 科帮网
+ * 创建时间 2018年4月3日
+ */
+@Controller
+public class IndexController {
+
+ /**
+ * 页面跳转
+ * @param module
+ * @param url
+ * @return
+ */
+ @RequestMapping("{url}.shtml")
+ public String page(@PathVariable("url") String url) {
+ return url;
+ }
+ /**
+ * 页面跳转(二级目录)
+ * @param module
+ * @param function
+ * @param url
+ * @return
+ */
+ @RequestMapping("{module}/{url}.shtml")
+ public String page(@PathVariable("module") String module,@PathVariable("url") String url) {
+ return module + "/" + url;
+ }
+
+}
diff --git a/src/main/java/com/itstyle/seckill/common/dynamicquery/DynamicQuery.java b/src/main/java/com/itstyle/seckill/common/dynamicquery/DynamicQuery.java
new file mode 100644
index 0000000..e03c3fe
--- /dev/null
+++ b/src/main/java/com/itstyle/seckill/common/dynamicquery/DynamicQuery.java
@@ -0,0 +1,80 @@
+package com.itstyle.seckill.common.dynamicquery;
+import java.util.List;
+/**
+ * 扩展SpringDataJpa, 支持动态jpql/nativesql查询并支持分页查询
+ * 使用方法:注入ServiceImpl
+ * 创建者 张志朋
+ * 创建时间 2018年3月8日
+ */
+public interface DynamicQuery {
+
+ public void save(Object entity);
+
+ public void update(Object entity);
+
+ public void delete(Class entityClass, Object entityid);
+
+ public void delete(Class entityClass, Object[] entityids);
+
+
+ /**
+ * 查询对象列表,返回List
+ * @param resultClass
+ * @param nativeSql
+ * @param params
+ * @return List
+ * @Date 2018年3月15日
+ * 更新日志
+ * 2018年3月15日 张志朋 首次创建
+ *
+ */
+ List nativeQueryList(String nativeSql, Object... params);
+
+ /**
+ * 查询对象列表,返回List