Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
晶之木
miaosha
提交
87c7ac9c
M
miaosha
项目概览
晶之木
/
miaosha
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
miaosha
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
87c7ac9c
编写于
10月 27, 2018
作者:
Q
qiurunze123
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
提交 lombok 与 maven 隔离!
上级
55fbc8d0
变更
41
隐藏空白更改
内联
并排
Showing
41 changed file
with
640 addition
and
312 deletion
+640
-312
README.md
README.md
+2
-1
miaosha.iml
miaosha.iml
+10
-2
pom.xml
pom.xml
+99
-0
src/main/java/com/geekq/miaosha/GeekQMainApplication.java
src/main/java/com/geekq/miaosha/GeekQMainApplication.java
+2
-2
src/main/java/com/geekq/miaosha/Test.java
src/main/java/com/geekq/miaosha/Test.java
+59
-17
src/main/java/com/geekq/miaosha/domain/Goods.java
src/main/java/com/geekq/miaosha/domain/Goods.java
+9
-42
src/main/java/com/geekq/miaosha/domain/MiaoshaGoods.java
src/main/java/com/geekq/miaosha/domain/MiaoshaGoods.java
+9
-30
src/main/java/com/geekq/miaosha/domain/MiaoshaOrder.java
src/main/java/com/geekq/miaosha/domain/MiaoshaOrder.java
+9
-24
src/main/java/com/geekq/miaosha/domain/MiaoshaUser.java
src/main/java/com/geekq/miaosha/domain/MiaoshaUser.java
+9
-49
src/main/java/com/geekq/miaosha/domain/OrderInfo.java
src/main/java/com/geekq/miaosha/domain/OrderInfo.java
+9
-66
src/main/java/com/geekq/miaosha/domain/User.java
src/main/java/com/geekq/miaosha/domain/User.java
+10
-13
src/main/java/com/geekq/miaosha/mybatis/README.md
src/main/java/com/geekq/miaosha/mybatis/README.md
+14
-0
src/main/java/com/geekq/miaosha/mybatis/controller/MessageController.java
...m/geekq/miaosha/mybatis/controller/MessageController.java
+17
-0
src/main/java/com/geekq/miaosha/vo/GoodsDetailVo.java
src/main/java/com/geekq/miaosha/vo/GoodsDetailVo.java
+10
-24
src/main/java/com/geekq/miaosha/vo/GoodsVo.java
src/main/java/com/geekq/miaosha/vo/GoodsVo.java
+5
-24
src/main/java/com/geekq/miaosha/vo/LoginVo.java
src/main/java/com/geekq/miaosha/vo/LoginVo.java
+8
-16
src/main/java/com/geekq/miaosha/vo/OrderDetailVo.java
src/main/java/com/geekq/miaosha/vo/OrderDetailVo.java
+8
-0
src/main/resources/application-dev.properties
src/main/resources/application-dev.properties
+71
-0
src/main/resources/application-prod.properties
src/main/resources/application-prod.properties
+71
-0
src/main/resources/application-test.properties
src/main/resources/application-test.properties
+71
-0
src/main/resources/application.properties
src/main/resources/application.properties
+4
-1
src/main/resources/config/application-test.properties
src/main/resources/config/application-test.properties
+72
-0
src/main/resources/dubbo/dubbo_consumer.xml
src/main/resources/dubbo/dubbo_consumer.xml
+26
-0
src/main/resources/dubbo/springmvc.xml
src/main/resources/dubbo/springmvc.xml
+32
-0
target/classes/application.properties
target/classes/application.properties
+4
-1
target/classes/com/geekq/miaosha/Test.class
target/classes/com/geekq/miaosha/Test.class
+0
-0
target/classes/com/geekq/miaosha/domain/Goods.class
target/classes/com/geekq/miaosha/domain/Goods.class
+0
-0
target/classes/com/geekq/miaosha/domain/MiaoshaGoods.class
target/classes/com/geekq/miaosha/domain/MiaoshaGoods.class
+0
-0
target/classes/com/geekq/miaosha/domain/MiaoshaOrder.class
target/classes/com/geekq/miaosha/domain/MiaoshaOrder.class
+0
-0
target/classes/com/geekq/miaosha/domain/MiaoshaUser.class
target/classes/com/geekq/miaosha/domain/MiaoshaUser.class
+0
-0
target/classes/com/geekq/miaosha/domain/OrderInfo.class
target/classes/com/geekq/miaosha/domain/OrderInfo.class
+0
-0
target/classes/com/geekq/miaosha/domain/User.class
target/classes/com/geekq/miaosha/domain/User.class
+0
-0
target/classes/com/geekq/miaosha/vo/GoodsDetailVo.class
target/classes/com/geekq/miaosha/vo/GoodsDetailVo.class
+0
-0
target/classes/com/geekq/miaosha/vo/GoodsVo.class
target/classes/com/geekq/miaosha/vo/GoodsVo.class
+0
-0
target/classes/com/geekq/miaosha/vo/LoginVo.class
target/classes/com/geekq/miaosha/vo/LoginVo.class
+0
-0
target/classes/com/geekq/miaosha/vo/OrderDetailVo.class
target/classes/com/geekq/miaosha/vo/OrderDetailVo.class
+0
-0
target/classes/com/geekq/miaosha/GeekQMainApplication.class
target/classes/com/geekq/miaosha/GeekQMainApplication.class
+0
-0
target/classes/static/bootstrap/fonts/glyphicons-halflings-regular.eot
...s/static/bootstrap/fonts/glyphicons-halflings-regular.eot
+0
-0
target/classes/static/bootstrap/fonts/glyphicons-halflings-regular.ttf
...s/static/bootstrap/fonts/glyphicons-halflings-regular.ttf
+0
-0
target/classes/static/bootstrap/fonts/glyphicons-halflings-regular.woff
.../static/bootstrap/fonts/glyphicons-halflings-regular.woff
+0
-0
target/classes/static/bootstrap/fonts/glyphicons-halflings-regular.woff2
...static/bootstrap/fonts/glyphicons-halflings-regular.woff2
+0
-0
未找到文件。
README.md
浏览文件 @
87c7ac9c
...
...
@@ -125,4 +125,5 @@ redis的数量不是库存,他的作用仅仅只是为了阻挡多余的请求
###
<font
color=
#0099ff
size=
3
>
15.mybatis如何使用注解与xml配置?
</font><br>
本文使用的是注解方法开发所以不做过多解释
<br>
下面仔细讲解以下如何详细使用xml开发
<br>
\ No newline at end of file
下面仔细讲解以下如何详细使用xml开发在目录里面有一个与本文无挂的类似于微信自动回复的功能br>
里面有mybatis的全部解析和用法,大家可以简单的当做一个demo来使用
<br>
miaosha.iml
浏览文件 @
87c7ac9c
...
...
@@ -20,6 +20,15 @@
</content>
<orderEntry
type=
"inheritedJdk"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"library"
name=
"Maven: com.alibaba:dubbo:2.5.3"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.javassist:javassist:3.21.0-GA"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.jboss.netty:netty:3.2.5.Final"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.apache.zookeeper:zookeeper:3.4.6"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.slf4j:slf4j-api:1.7.25"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: jline:jline:0.9.94"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: junit:junit:4.12"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.hamcrest:hamcrest-core:1.3"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: io.netty:netty:3.7.0.Final"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework.boot:spring-boot-starter-web:1.5.8.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework.boot:spring-boot-starter:1.5.8.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework.boot:spring-boot:1.5.8.RELEASE"
level=
"project"
/>
...
...
@@ -54,9 +63,7 @@
<orderEntry
type=
"library"
name=
"Maven: org.thymeleaf:thymeleaf-spring4:2.1.5.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.thymeleaf:thymeleaf:2.1.5.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: ognl:ognl:3.0.8"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.javassist:javassist:3.21.0-GA"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.unbescape:unbescape:1.1.0.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.slf4j:slf4j-api:1.7.25"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:1.4.0"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.codehaus.groovy:groovy:2.4.12"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.1"
level=
"project"
/>
...
...
@@ -86,5 +93,6 @@
<orderEntry
type=
"library"
name=
"Maven: org.springframework.retry:spring-retry:1.2.1.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework.amqp:spring-amqp:1.7.4.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework:spring-tx:4.3.12.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"PROVIDED"
name=
"Maven: org.projectlombok:lombok:1.18.2"
level=
"project"
/>
</component>
</module>
\ No newline at end of file
pom.xml
浏览文件 @
87c7ac9c
...
...
@@ -19,7 +19,33 @@
</properties>
<dependencies>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
dubbo
</artifactId>
<version>
2.5.3
</version>
<exclusions>
<exclusion>
<groupId>
org.springframework
</groupId>
<artifactId>
spring
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.apache.zookeeper
</groupId>
<artifactId>
zookeeper
</artifactId>
<version>
3.4.6
</version>
<exclusions>
<exclusion>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-log4j12
</artifactId>
</exclusion>
<exclusion>
<groupId>
log4j
</groupId>
<artifactId>
log4j
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
...
...
@@ -96,6 +122,14 @@
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-amqp
</artifactId>
</dependency>
<!--lombook引用-->
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<version>
1.18.2
</version>
<scope>
provided
</scope>
</dependency>
</dependencies>
<build>
...
...
@@ -105,6 +139,23 @@
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
1.5.2.RELEASE
</version>
<configuration>
<mainClass>
com.geekq.miaosha.GeekQMainApplication
</mainClass>
<!--springboot启动类目录-->
</configuration>
<executions>
<execution>
<goals>
<!--创建一个自动可执行的jar或war文件 -->
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
...
...
@@ -113,7 +164,55 @@
<include>
**/*.xml
</include>
</includes>
</resource>
<resource>
<!--配置文件路径 -->
<directory>
src/main/resources
</directory>
<!--这里对应项目存放配置文件的目录-->
<!--开启filtering功能 -->
<filtering>
true
</filtering>
<excludes>
<exclude>
application.properties
</exclude>
<exclude>
application-dev.properties
</exclude>
<exclude>
application-prod.properties
</exclude>
<exclude>
application-test.properties
</exclude>
</excludes>
</resource>
<resource>
<!--配置文件路径 -->
<directory>
src/main/resources
</directory>
<!--这里对应项目存放配置文件的目录-->
<!--开启filtering功能 -->
<filtering>
true
</filtering>
<includes>
<include>
application-${activatedProperties}.properties
</include>
<include>
application.properties
</include>
</includes>
</resource>
</resources>
</build>
<profiles>
<profile>
<id>
dev
</id>
<properties>
<!-- 环境标识,需要与配置文件的名称相对应 -->
<activatedProperties>
dev
</activatedProperties>
</properties>
<activation>
<!-- 默认环境 -->
<activeByDefault>
true
</activeByDefault>
</activation>
</profile>
<profile>
<id>
test
</id>
<properties>
<activatedProperties>
test
</activatedProperties>
</properties>
</profile>
<profile>
<id>
prod
</id>
<properties>
<activatedProperties>
prod
</activatedProperties>
</properties>
</profile>
</profiles>
</project>
src/main/java/com/geekq/miaosha/
G
eekQMainApplication.java
→
src/main/java/com/geekq/miaosha/
G
eekQMainApplication.java
浏览文件 @
87c7ac9c
...
...
@@ -4,10 +4,10 @@ import org.springframework.boot.SpringApplication;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
@SpringBootApplication
public
class
G
eekQMainApplication
{
public
class
G
eekQMainApplication
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
SpringApplication
.
run
(
G
eekQMainApplication
.
class
,
args
);
SpringApplication
.
run
(
G
eekQMainApplication
.
class
,
args
);
}
...
...
src/main/java/com/geekq/miaosha/Test.java
浏览文件 @
87c7ac9c
package
com.geekq.miaosha
;
import
com.geekq.miaosha.domain.MiaoshaUser
;
import
org.apache.ibatis.io.Resources
;
import
org.apache.ibatis.session.SqlSession
;
import
org.apache.ibatis.session.SqlSessionFactory
;
import
org.apache.ibatis.session.SqlSessionFactoryBuilder
;
import
java.io.IOException
;
import
java.io.Reader
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* mybatis xml 写法的配置测试类
*/
public
class
Test
{
public
static
void
main
(
String
[]
args
)
throws
IOException
{
public
static
List
<
Double
>
list
=
new
ArrayList
<
Double
>();
//读取配置文件
Reader
reader
=
Resources
.
getResourceAsReader
(
"config.xml"
)
;
S
qlSessionFactory
sessionFactory
=
new
SqlSessionFactoryBuilder
().
build
(
reader
);
public
static
void
main
(
String
[]
args
)
{
double
[]
keys
=
{
1
,
2
,
3
}
;
S
ystem
.
err
.
println
(
getNum
(
keys
,
5
)
);
SqlSession
session
=
sessionFactory
.
openSession
();
// 举例:3 个元素:a, b, c。所以有2 ^ 3 = 8 个组合结果:所以i = 0, 1, 2,....7.对应应输出 a, b, ab, c...abc(注意a表示001,不是100.)
//
// 将i变成2进制:
// i = 1 = 001
// i = 2 = 010
// i = 3 = 011
//
// (1) j = 0 (1) j = 0 (1) j = 0
// 移1位:1 << j == 001 1 << j == 001 1 << j == 001
// 和i = 001 相与,两个位都为1,返回1 与i无相同位 和i = 001 相与,两个位都为1,返回1
// 输出:a 输出a
//
// (2) j = 1 (2) j = 1 (2) j = 1
// 再移一位:1 << j == 010 1 << j == 010 1 << j == 010
// 与i = 001 相与。无相同1 和i相与,两个位都为1,返回1 和i相与,两个位都为1,返回1
// 输出b 输出b
//
// (3) j = 2 3)j = 2 (3) j = 2
// 移一位 1 << j == 100 1 << j == 100
// 与i无相同位 与i无相同位 与i无相同位
//
// 所以i = 001, 只输出a.所以i = 010, 只输出b.所以011,输出ab
//
// *************************************
// *可见上面每一个数字i, 只会判断判断3次,因为只需要移三次位,二进制就遍历完了
String
statement
=
"com.geekq.miaosha.dao.UserMapper.getMiaoShaUserById"
;
MiaoshaUser
user
=
session
.
selectOne
(
statement
,
"18612766134"
);
}
System
.
out
.
println
(
user
.
toString
());
static
List
<
Double
>
getNum
(
double
[]
keys
,
double
kill
)
{
int
n
=
keys
.
length
;
//数字长度
System
.
out
.
println
(
n
);
int
nbit
=
1
<<
n
;
// 8
System
.
out
.
println
(
nbit
);
double
in
;
List
<
Double
>
list
=
new
ArrayList
<
Double
>();
for
(
int
i
=
0
;
i
<
nbit
;
i
++)
{
System
.
out
.
println
(
"nbit======="
+
i
);
in
=
0
;
list
.
clear
();
for
(
int
j
=
0
;
j
<
n
;
j
++)
{
System
.
out
.
println
(
"j======"
+
j
);
int
tmp
=
1
<<
j
;
// 由0到n右移位
System
.
out
.
println
(
"tmp===="
+
tmp
);
if
((
tmp
&
i
)
!=
0
)
{
// 与运算,同为1时才会是1
System
.
out
.
println
(
"keys[j]=========="
+
keys
[
j
]);
in
+=
keys
[
j
];
list
.
add
(
keys
[
j
]);
}
}
if
(
in
==
kill
){
return
list
;
}
}
return
list
;
}
}
}
\ No newline at end of file
src/main/java/com/geekq/miaosha/domain/Goods.java
浏览文件 @
87c7ac9c
package
com.geekq.miaosha.domain
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public
class
Goods
{
private
Long
id
;
private
String
goodsName
;
...
...
@@ -8,46 +17,4 @@ public class Goods {
private
String
goodsDetail
;
private
Double
goodsPrice
;
private
Integer
goodsStock
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getGoodsName
()
{
return
goodsName
;
}
public
void
setGoodsName
(
String
goodsName
)
{
this
.
goodsName
=
goodsName
;
}
public
String
getGoodsTitle
()
{
return
goodsTitle
;
}
public
void
setGoodsTitle
(
String
goodsTitle
)
{
this
.
goodsTitle
=
goodsTitle
;
}
public
String
getGoodsImg
()
{
return
goodsImg
;
}
public
void
setGoodsImg
(
String
goodsImg
)
{
this
.
goodsImg
=
goodsImg
;
}
public
String
getGoodsDetail
()
{
return
goodsDetail
;
}
public
void
setGoodsDetail
(
String
goodsDetail
)
{
this
.
goodsDetail
=
goodsDetail
;
}
public
Double
getGoodsPrice
()
{
return
goodsPrice
;
}
public
void
setGoodsPrice
(
Double
goodsPrice
)
{
this
.
goodsPrice
=
goodsPrice
;
}
public
Integer
getGoodsStock
()
{
return
goodsStock
;
}
public
void
setGoodsStock
(
Integer
goodsStock
)
{
this
.
goodsStock
=
goodsStock
;
}
}
src/main/java/com/geekq/miaosha/domain/MiaoshaGoods.java
浏览文件 @
87c7ac9c
package
com.geekq.miaosha.domain
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
java.util.Date
;
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public
class
MiaoshaGoods
{
private
Long
id
;
private
Long
goodsId
;
private
Integer
stockCount
;
private
Date
startDate
;
private
Date
endDate
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getGoodsId
()
{
return
goodsId
;
}
public
void
setGoodsId
(
Long
goodsId
)
{
this
.
goodsId
=
goodsId
;
}
public
Integer
getStockCount
()
{
return
stockCount
;
}
public
void
setStockCount
(
Integer
stockCount
)
{
this
.
stockCount
=
stockCount
;
}
public
Date
getStartDate
()
{
return
startDate
;
}
public
void
setStartDate
(
Date
startDate
)
{
this
.
startDate
=
startDate
;
}
public
Date
getEndDate
()
{
return
endDate
;
}
public
void
setEndDate
(
Date
endDate
)
{
this
.
endDate
=
endDate
;
}
}
src/main/java/com/geekq/miaosha/domain/MiaoshaOrder.java
浏览文件 @
87c7ac9c
package
com.geekq.miaosha.domain
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public
class
MiaoshaOrder
{
private
Long
id
;
private
Long
userId
;
private
Long
orderId
;
private
Long
goodsId
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Long
userId
)
{
this
.
userId
=
userId
;
}
public
Long
getOrderId
()
{
return
orderId
;
}
public
void
setOrderId
(
Long
orderId
)
{
this
.
orderId
=
orderId
;
}
public
Long
getGoodsId
()
{
return
goodsId
;
}
public
void
setGoodsId
(
Long
goodsId
)
{
this
.
goodsId
=
goodsId
;
}
}
src/main/java/com/geekq/miaosha/domain/MiaoshaUser.java
浏览文件 @
87c7ac9c
package
com.geekq.miaosha.domain
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
java.util.Date
;
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public
class
MiaoshaUser
{
private
Long
id
;
private
String
nickname
;
...
...
@@ -11,55 +20,6 @@ public class MiaoshaUser {
private
Date
registerDate
;
private
Date
lastLoginDate
;
private
Integer
loginCount
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getNickname
()
{
return
nickname
;
}
public
void
setNickname
(
String
nickname
)
{
this
.
nickname
=
nickname
;
}
public
String
getPassword
()
{
return
password
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
public
String
getSalt
()
{
return
salt
;
}
public
void
setSalt
(
String
salt
)
{
this
.
salt
=
salt
;
}
public
String
getHead
()
{
return
head
;
}
public
void
setHead
(
String
head
)
{
this
.
head
=
head
;
}
public
Date
getRegisterDate
()
{
return
registerDate
;
}
public
void
setRegisterDate
(
Date
registerDate
)
{
this
.
registerDate
=
registerDate
;
}
public
Date
getLastLoginDate
()
{
return
lastLoginDate
;
}
public
void
setLastLoginDate
(
Date
lastLoginDate
)
{
this
.
lastLoginDate
=
lastLoginDate
;
}
public
Integer
getLoginCount
()
{
return
loginCount
;
}
public
void
setLoginCount
(
Integer
loginCount
)
{
this
.
loginCount
=
loginCount
;
}
@Override
public
String
toString
()
{
return
"MiaoshaUser{"
+
...
...
src/main/java/com/geekq/miaosha/domain/OrderInfo.java
浏览文件 @
87c7ac9c
package
com.geekq.miaosha.domain
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
java.util.Date
;
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public
class
OrderInfo
{
private
Long
id
;
private
Long
userId
;
...
...
@@ -14,70 +23,4 @@ public class OrderInfo {
private
Integer
status
;
private
Date
createDate
;
private
Date
payDate
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Long
userId
)
{
this
.
userId
=
userId
;
}
public
Long
getGoodsId
()
{
return
goodsId
;
}
public
void
setGoodsId
(
Long
goodsId
)
{
this
.
goodsId
=
goodsId
;
}
public
Long
getDeliveryAddrId
()
{
return
deliveryAddrId
;
}
public
void
setDeliveryAddrId
(
Long
deliveryAddrId
)
{
this
.
deliveryAddrId
=
deliveryAddrId
;
}
public
String
getGoodsName
()
{
return
goodsName
;
}
public
void
setGoodsName
(
String
goodsName
)
{
this
.
goodsName
=
goodsName
;
}
public
Integer
getGoodsCount
()
{
return
goodsCount
;
}
public
void
setGoodsCount
(
Integer
goodsCount
)
{
this
.
goodsCount
=
goodsCount
;
}
public
Double
getGoodsPrice
()
{
return
goodsPrice
;
}
public
void
setGoodsPrice
(
Double
goodsPrice
)
{
this
.
goodsPrice
=
goodsPrice
;
}
public
Integer
getOrderChannel
()
{
return
orderChannel
;
}
public
void
setOrderChannel
(
Integer
orderChannel
)
{
this
.
orderChannel
=
orderChannel
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
Date
getCreateDate
()
{
return
createDate
;
}
public
void
setCreateDate
(
Date
createDate
)
{
this
.
createDate
=
createDate
;
}
public
Date
getPayDate
()
{
return
payDate
;
}
public
void
setPayDate
(
Date
payDate
)
{
this
.
payDate
=
payDate
;
}
}
src/main/java/com/geekq/miaosha/domain/User.java
浏览文件 @
87c7ac9c
package
com.geekq.miaosha.domain
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public
class
User
{
private
int
id
;
private
String
name
;
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
}
\ No newline at end of file
src/main/java/com/geekq/miaosha/mybatis/README.md
0 → 100644
浏览文件 @
87c7ac9c
### 前言 mybatis的一些使用
SqlSession 的作用
<br>
1.
像sql中传入语句
<br>
2.
执行SQL语句
<br>
3.
获取执行SQL语句的结果
<br>
4.
事物的控制
<br>
### 如何获得sqlsession?
1.
配置文件获取数据库链接相关信息
<br>
2.
通过配置文件来构建sqlsessionfactory
<br>
3.
通过sqlsessionfactory打开数据库会话
<br>
src/main/java/com/geekq/miaosha/mybatis/controller/MessageController.java
0 → 100644
浏览文件 @
87c7ac9c
package
com.geekq.miaosha.mybatis.controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
@Controller
@RequestMapping
(
"/message"
)
public
class
MessageController
{
@RequestMapping
(
"index"
)
public
String
index
(){
return
"message"
;
}
}
src/main/java/com/geekq/miaosha/vo/GoodsDetailVo.java
浏览文件 @
87c7ac9c
package
com.geekq.miaosha.vo
;
import
com.geekq.miaosha.domain.MiaoshaUser
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public
class
GoodsDetailVo
{
private
int
miaoshaStatus
=
0
;
private
int
remainSeconds
=
0
;
private
GoodsVo
goods
;
private
MiaoshaUser
user
;
public
int
getMiaoshaStatus
()
{
return
miaoshaStatus
;
}
public
void
setMiaoshaStatus
(
int
miaoshaStatus
)
{
this
.
miaoshaStatus
=
miaoshaStatus
;
}
public
int
getRemainSeconds
()
{
return
remainSeconds
;
}
public
void
setRemainSeconds
(
int
remainSeconds
)
{
this
.
remainSeconds
=
remainSeconds
;
}
public
GoodsVo
getGoods
()
{
return
goods
;
}
public
void
setGoods
(
GoodsVo
goods
)
{
this
.
goods
=
goods
;
}
public
MiaoshaUser
getUser
()
{
return
user
;
}
public
void
setUser
(
MiaoshaUser
user
)
{
this
.
user
=
user
;
}
}
src/main/java/com/geekq/miaosha/vo/GoodsVo.java
浏览文件 @
87c7ac9c
package
com.geekq.miaosha.vo
;
import
com.geekq.miaosha.domain.Goods
;
import
lombok.*
;
import
java.util.Date
;
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public
class
GoodsVo
extends
Goods
{
private
Double
miaoshaPrice
;
private
Integer
stockCount
;
private
Date
startDate
;
private
Date
endDate
;
public
Integer
getStockCount
()
{
return
stockCount
;
}
public
void
setStockCount
(
Integer
stockCount
)
{
this
.
stockCount
=
stockCount
;
}
public
Date
getStartDate
()
{
return
startDate
;
}
public
void
setStartDate
(
Date
startDate
)
{
this
.
startDate
=
startDate
;
}
public
Date
getEndDate
()
{
return
endDate
;
}
public
void
setEndDate
(
Date
endDate
)
{
this
.
endDate
=
endDate
;
}
public
Double
getMiaoshaPrice
()
{
return
miaoshaPrice
;
}
public
void
setMiaoshaPrice
(
Double
miaoshaPrice
)
{
this
.
miaoshaPrice
=
miaoshaPrice
;
}
}
src/main/java/com/geekq/miaosha/vo/LoginVo.java
浏览文件 @
87c7ac9c
package
com.geekq.miaosha.vo
;
import
com.geekq.miaosha.validator.IsMobile
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotNull
;
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public
class
LoginVo
{
@NotNull
@IsMobile
...
...
@@ -14,22 +22,6 @@ public class LoginVo {
@Length
(
min
=
32
)
private
String
password
;
public
String
getMobile
()
{
return
mobile
;
}
public
void
setMobile
(
String
mobile
)
{
this
.
mobile
=
mobile
;
}
public
String
getPassword
()
{
return
password
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
@Override
public
String
toString
()
{
return
"LoginVo{"
+
...
...
src/main/java/com/geekq/miaosha/vo/OrderDetailVo.java
浏览文件 @
87c7ac9c
package
com.geekq.miaosha.vo
;
import
com.geekq.miaosha.domain.OrderInfo
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public
class
OrderDetailVo
{
private
GoodsVo
goods
;
private
OrderInfo
order
;
...
...
src/main/resources/application-dev.properties
0 → 100644
浏览文件 @
87c7ac9c
#thymeleaf
spring.thymeleaf.prefix
=
classpath:/templates/
spring.thymeleaf.suffix
=
.html
spring.thymeleaf.cache
=
false
spring.thymeleaf.content-type
=
text/html
spring.thymeleaf.enabled
=
true
spring.thymeleaf.encoding
=
UTF-8
spring.thymeleaf.mode
=
HTML5
#mybatis
mybatis.type-aliases-package
=
com.geekq.miaosha.domain
#开启驼峰转换
mybatis.configuration.map-underscore-to-camel-case
=
true
#mybatis.mapperLocations = classpath:com/geekq/miaosha/dao/*.xml
mybatis.mapperLocations
=
classpath:mybatis/mapper/*.xml
#add mybatis
mybatis.config-locations
=
classpath:mybatis/config.xml
#datasource
spring.datasource.url
=
jdbc:mysql://localhost:3306/qiurunze?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
spring.datasource.username
=
root
spring.datasource.password
=
aixiyue11
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
#druid
spring.datasource.type
=
com.alibaba.druid.pool.DruidDataSource
spring.datasource.filters
=
stat
spring.datasource.maxActive
=
1000
spring.datasource.initialSize
=
100
spring.datasource.maxWait
=
60000
spring.datasource.minIdle
=
500
spring.datasource.timeBetweenEvictionRunsMillis
=
60000
spring.datasource.minEvictableIdleTimeMillis
=
300000
spring.datasource.validationQuery
=
select 'x'
spring.datasource.testWhileIdle
=
true
spring.datasource.testOnBorrow
=
false
spring.datasource.testOnReturn
=
false
spring.datasource.poolPreparedStatements
=
true
spring.datasource.maxOpenPreparedStatements
=
20
#static
spring.resources.add-mappings
=
true
spring.resources.cache-period
=
3600
spring.resources.chain.cache
=
true
spring.resources.chain.enabled
=
true
spring.resources.chain.gzipped
=
true
spring.resources.chain.html-application-cache
=
true
spring.resources.static-locations
=
classpath:/static/
#redis
redis.host
=
192.168.1.116
redis.port
=
6379
redis.timeout
=
100
redis.password
=
123456
redis.poolMaxTotal
=
1000
redis.poolMaxIdle
=
500
redis.poolMaxWait
=
500
#rabbitmq
spring.rabbitmq.host
=
localhost
spring.rabbitmq.port
=
5672
spring.rabbitmq.username
=
guest
spring.rabbitmq.password
=
guest
spring.rabbitmq.virtual-host
=
/
spring.rabbitmq.listener.simple.concurrency
=
10
spring.rabbitmq.listener.simple.max-concurrency
=
10
spring.rabbitmq.listener.simple.prefetch
=
1
spring.rabbitmq.listener.simple.auto-startup
=
true
spring.rabbitmq.listener.simple.default-requeue-rejected
=
true
spring.rabbitmq.template.retry.enabled
=
true
spring.rabbitmq.template.retry.initial-interval
=
1000
spring.rabbitmq.template.retry.max-attempts
=
3
spring.rabbitmq.template.retry.max-interval
=
10000
spring.rabbitmq.template.retry.multiplier
=
1.0
##
maven隔离
\ No newline at end of file
src/main/resources/application-prod.properties
0 → 100644
浏览文件 @
87c7ac9c
#thymeleaf
spring.thymeleaf.prefix
=
classpath:/templates/
spring.thymeleaf.suffix
=
.html
spring.thymeleaf.cache
=
false
spring.thymeleaf.content-type
=
text/html
spring.thymeleaf.enabled
=
true
spring.thymeleaf.encoding
=
UTF-8
spring.thymeleaf.mode
=
HTML5
#mybatis
mybatis.type-aliases-package
=
com.geekq.miaosha.domain
#开启驼峰转换
mybatis.configuration.map-underscore-to-camel-case
=
true
#mybatis.mapperLocations = classpath:com/geekq/miaosha/dao/*.xml
mybatis.mapperLocations
=
classpath:mybatis/mapper/*.xml
#add mybatis
mybatis.config-locations
=
classpath:mybatis/config.xml
#datasource
spring.datasource.url
=
jdbc:mysql://localhost:3306/miaosha?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
spring.datasource.username
=
root
spring.datasource.password
=
aixiyue11
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
#druid
spring.datasource.type
=
com.alibaba.druid.pool.DruidDataSource
spring.datasource.filters
=
stat
spring.datasource.maxActive
=
1000
spring.datasource.initialSize
=
100
spring.datasource.maxWait
=
60000
spring.datasource.minIdle
=
500
spring.datasource.timeBetweenEvictionRunsMillis
=
60000
spring.datasource.minEvictableIdleTimeMillis
=
300000
spring.datasource.validationQuery
=
select 'x'
spring.datasource.testWhileIdle
=
true
spring.datasource.testOnBorrow
=
false
spring.datasource.testOnReturn
=
false
spring.datasource.poolPreparedStatements
=
true
spring.datasource.maxOpenPreparedStatements
=
20
#static
spring.resources.add-mappings
=
true
spring.resources.cache-period
=
3600
spring.resources.chain.cache
=
true
spring.resources.chain.enabled
=
true
spring.resources.chain.gzipped
=
true
spring.resources.chain.html-application-cache
=
true
spring.resources.static-locations
=
classpath:/static/
#redis
redis.host
=
192.168.1.116
redis.port
=
6379
redis.timeout
=
100
redis.password
=
123456
redis.poolMaxTotal
=
1000
redis.poolMaxIdle
=
500
redis.poolMaxWait
=
500
#rabbitmq
spring.rabbitmq.host
=
localhost
spring.rabbitmq.port
=
5672
spring.rabbitmq.username
=
guest
spring.rabbitmq.password
=
guest
spring.rabbitmq.virtual-host
=
/
spring.rabbitmq.listener.simple.concurrency
=
10
spring.rabbitmq.listener.simple.max-concurrency
=
10
spring.rabbitmq.listener.simple.prefetch
=
1
spring.rabbitmq.listener.simple.auto-startup
=
true
spring.rabbitmq.listener.simple.default-requeue-rejected
=
true
spring.rabbitmq.template.retry.enabled
=
true
spring.rabbitmq.template.retry.initial-interval
=
1000
spring.rabbitmq.template.retry.max-attempts
=
3
spring.rabbitmq.template.retry.max-interval
=
10000
spring.rabbitmq.template.retry.multiplier
=
1.0
##
maven隔离
\ No newline at end of file
src/main/resources/application-test.properties
0 → 100644
浏览文件 @
87c7ac9c
#thymeleaf test
spring.thymeleaf.prefix
=
classpath:/templates/
spring.thymeleaf.suffix
=
.html
spring.thymeleaf.cache
=
false
spring.thymeleaf.content-type
=
text/html
spring.thymeleaf.enabled
=
true
spring.thymeleaf.encoding
=
UTF-8
spring.thymeleaf.mode
=
HTML5
#mybatis
mybatis.type-aliases-package
=
com.geekq.miaosha.domain
#开启驼峰转换
mybatis.configuration.map-underscore-to-camel-case
=
true
#mybatis.mapperLocations = classpath:com/geekq/miaosha/dao/*.xml
mybatis.mapperLocations
=
classpath:mybatis/mapper/*.xml
#add mybatis
mybatis.config-locations
=
classpath:mybatis/config.xml
#datasource
spring.datasource.url
=
jdbc:mysql://localhost:3306/miaosha?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
spring.datasource.username
=
root
spring.datasource.password
=
aixiyue11
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
#druid
spring.datasource.type
=
com.alibaba.druid.pool.DruidDataSource
spring.datasource.filters
=
stat
spring.datasource.maxActive
=
1000
spring.datasource.initialSize
=
100
spring.datasource.maxWait
=
60000
spring.datasource.minIdle
=
500
spring.datasource.timeBetweenEvictionRunsMillis
=
60000
spring.datasource.minEvictableIdleTimeMillis
=
300000
spring.datasource.validationQuery
=
select 'x'
spring.datasource.testWhileIdle
=
true
spring.datasource.testOnBorrow
=
false
spring.datasource.testOnReturn
=
false
spring.datasource.poolPreparedStatements
=
true
spring.datasource.maxOpenPreparedStatements
=
20
#static
spring.resources.add-mappings
=
true
spring.resources.cache-period
=
3600
spring.resources.chain.cache
=
true
spring.resources.chain.enabled
=
true
spring.resources.chain.gzipped
=
true
spring.resources.chain.html-application-cache
=
true
spring.resources.static-locations
=
classpath:/static/
#redis
redis.host
=
192.168.1.116
redis.port
=
6379
redis.timeout
=
100
redis.password
=
123456
redis.poolMaxTotal
=
1000
redis.poolMaxIdle
=
500
redis.poolMaxWait
=
500
#rabbitmq
spring.rabbitmq.host
=
localhost
spring.rabbitmq.port
=
5672
spring.rabbitmq.username
=
guest
spring.rabbitmq.password
=
guest
spring.rabbitmq.virtual-host
=
/
spring.rabbitmq.listener.simple.concurrency
=
10
spring.rabbitmq.listener.simple.max-concurrency
=
10
spring.rabbitmq.listener.simple.prefetch
=
1
spring.rabbitmq.listener.simple.auto-startup
=
true
spring.rabbitmq.listener.simple.default-requeue-rejected
=
true
spring.rabbitmq.template.retry.enabled
=
true
spring.rabbitmq.template.retry.initial-interval
=
1000
spring.rabbitmq.template.retry.max-attempts
=
3
spring.rabbitmq.template.retry.max-interval
=
10000
spring.rabbitmq.template.retry.multiplier
=
1.0
##
maven隔离
\ No newline at end of file
src/main/resources/application.properties
浏览文件 @
87c7ac9c
...
...
@@ -66,4 +66,7 @@ spring.rabbitmq.template.retry.enabled=true
spring.rabbitmq.template.retry.initial-interval
=
1000
spring.rabbitmq.template.retry.max-attempts
=
3
spring.rabbitmq.template.retry.max-interval
=
10000
spring.rabbitmq.template.retry.multiplier
=
1.0
\ No newline at end of file
spring.rabbitmq.template.retry.multiplier
=
1.0
## maven隔离
pring.profiles.active
=
@activatedProperties@
\ No newline at end of file
src/main/resources/config/application-test.properties
0 → 100644
浏览文件 @
87c7ac9c
#thymeleaf test
spring.thymeleaf.prefix
=
classpath:/templates/
spring.thymeleaf.suffix
=
.html
spring.thymeleaf.cache
=
false
spring.thymeleaf.content-type
=
text/html
spring.thymeleaf.enabled
=
true
spring.thymeleaf.encoding
=
UTF-8
spring.thymeleaf.mode
=
HTML5
#mybatis
mybatis.type-aliases-package
=
com.geekq.miaosha.domain
#开启驼峰转换
mybatis.configuration.map-underscore-to-camel-case
=
true
#mybatis.mapperLocations = classpath:com/geekq/miaosha/dao/*.xml
mybatis.mapperLocations
=
classpath:mybatis/mapper/*.xml
#add mybatis
mybatis.config-locations
=
classpath:mybatis/config.xml
#datasource
spring.datasource.url
=
jdbc:mysql://localhost:3306/miaosha?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
spring.datasource.username
=
root
spring.datasource.password
=
aixiyue11
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
#druid
spring.datasource.type
=
com.alibaba.druid.pool.DruidDataSource
spring.datasource.filters
=
stat
spring.datasource.maxActive
=
1000
spring.datasource.initialSize
=
100
spring.datasource.maxWait
=
60000
spring.datasource.minIdle
=
500
spring.datasource.timeBetweenEvictionRunsMillis
=
60000
spring.datasource.minEvictableIdleTimeMillis
=
300000
spring.datasource.validationQuery
=
select 'x'
spring.datasource.testWhileIdle
=
true
spring.datasource.testOnBorrow
=
false
spring.datasource.testOnReturn
=
false
spring.datasource.poolPreparedStatements
=
true
spring.datasource.maxOpenPreparedStatements
=
20
#static
spring.resources.add-mappings
=
true
spring.resources.cache-period
=
3600
spring.resources.chain.cache
=
true
spring.resources.chain.enabled
=
true
spring.resources.chain.gzipped
=
true
spring.resources.chain.html-application-cache
=
true
spring.resources.static-locations
=
classpath:/static/
#redis
redis.host
=
192.168.1.116
redis.port
=
6379
redis.timeout
=
100
redis.password
=
123456
redis.poolMaxTotal
=
1000
redis.poolMaxIdle
=
500
redis.poolMaxWait
=
500
#rabbitmq
spring.rabbitmq.host
=
localhost
spring.rabbitmq.port
=
5672
spring.rabbitmq.username
=
guest
spring.rabbitmq.password
=
guest
spring.rabbitmq.virtual-host
=
/
spring.rabbitmq.listener.simple.concurrency
=
10
spring.rabbitmq.listener.simple.max-concurrency
=
10
spring.rabbitmq.listener.simple.prefetch
=
1
spring.rabbitmq.listener.simple.auto-startup
=
true
spring.rabbitmq.listener.simple.default-requeue-rejected
=
true
spring.rabbitmq.template.retry.enabled
=
true
spring.rabbitmq.template.retry.initial-interval
=
1000
spring.rabbitmq.template.retry.max-attempts
=
3
spring.rabbitmq.template.retry.max-interval
=
10000
spring.rabbitmq.template.retry.multiplier
=
1.0
## maven隔离
pring.profiles.active
=
@activatedProperties@
\ No newline at end of file
src/main/resources/dubbo/dubbo_consumer.xml
0 → 100644
浏览文件 @
87c7ac9c
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:dubbo=
"http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://code.alibabatech.com/schema/dubbo
http://code.alibabatech.com/schema/dubbo/dubbo.xsd "
>
<!-- 消费方应用名,用于计算依赖关系,不是匹配条件,不要与提供方一样 -->
<dubbo:application
name=
"dubbo_consumer"
/>
<!-- 使用multicast广播注册中心暴露发现服务地址 -->
<dubbo:registry
protocol=
"zookeeper"
address=
"zookeeper://192.168.1.116:2181"
/>
<!-- 生成远程服务代理,可以和本地bean一样使用demoService -->
<dubbo:reference
id=
"demoService"
interface=
"com.geekq.miaosha.api.DemoService"
/>
</beans>
src/main/resources/dubbo/springmvc.xml
0 → 100644
浏览文件 @
87c7ac9c
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:aop=
"http://www.springframework.org/schema/aop"
xmlns:context=
"http://www.springframework.org/schema/context"
xmlns:util=
"http://www.springframework.org/schema/util"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-4.0.xsd"
default-autowire=
"byName"
>
<aop:aspectj-autoproxy
/>
<context:component-scan
base-package=
"com.geekq.miaosha"
/>
<import
resource=
"classpath:/dubbo_consumer.xml"
/>
</beans>
target/classes/application.properties
浏览文件 @
87c7ac9c
...
...
@@ -66,4 +66,7 @@ spring.rabbitmq.template.retry.enabled=true
spring.rabbitmq.template.retry.initial-interval
=
1000
spring.rabbitmq.template.retry.max-attempts
=
3
spring.rabbitmq.template.retry.max-interval
=
10000
spring.rabbitmq.template.retry.multiplier
=
1.0
\ No newline at end of file
spring.rabbitmq.template.retry.multiplier
=
1.0
## maven隔离
pring.profiles.active
=
test
\ No newline at end of file
target/classes/com/geekq/miaosha/Test.class
浏览文件 @
87c7ac9c
无法预览此类型文件
target/classes/com/geekq/miaosha/domain/Goods.class
浏览文件 @
87c7ac9c
无法预览此类型文件
target/classes/com/geekq/miaosha/domain/MiaoshaGoods.class
浏览文件 @
87c7ac9c
无法预览此类型文件
target/classes/com/geekq/miaosha/domain/MiaoshaOrder.class
浏览文件 @
87c7ac9c
无法预览此类型文件
target/classes/com/geekq/miaosha/domain/MiaoshaUser.class
浏览文件 @
87c7ac9c
无法预览此类型文件
target/classes/com/geekq/miaosha/domain/OrderInfo.class
浏览文件 @
87c7ac9c
无法预览此类型文件
target/classes/com/geekq/miaosha/domain/User.class
浏览文件 @
87c7ac9c
无法预览此类型文件
target/classes/com/geekq/miaosha/vo/GoodsDetailVo.class
浏览文件 @
87c7ac9c
无法预览此类型文件
target/classes/com/geekq/miaosha/vo/GoodsVo.class
浏览文件 @
87c7ac9c
无法预览此类型文件
target/classes/com/geekq/miaosha/vo/LoginVo.class
浏览文件 @
87c7ac9c
无法预览此类型文件
target/classes/com/geekq/miaosha/vo/OrderDetailVo.class
浏览文件 @
87c7ac9c
无法预览此类型文件
target/classes/com/geekq/miaosha/GeekQMainApplication.class
已删除
100644 → 0
浏览文件 @
55fbc8d0
文件已删除
target/classes/static/bootstrap/fonts/glyphicons-halflings-regular.eot
浏览文件 @
87c7ac9c
无法预览此类型文件
target/classes/static/bootstrap/fonts/glyphicons-halflings-regular.ttf
浏览文件 @
87c7ac9c
无法预览此类型文件
target/classes/static/bootstrap/fonts/glyphicons-halflings-regular.woff
浏览文件 @
87c7ac9c
无法预览此类型文件
target/classes/static/bootstrap/fonts/glyphicons-halflings-regular.woff2
浏览文件 @
87c7ac9c
无法预览此类型文件
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录