File tree Expand file tree Collapse file tree 17 files changed +177
-61
lines changed
java/com/coderqian/dubbocore
java/com/coderqian/dubboprovider Expand file tree Collapse file tree 17 files changed +177
-61
lines changed Original file line number Diff line number Diff line change @@ -27,4 +27,5 @@ nbdist/
2727mvnw
2828mvnw.cmd
2929
30- /logs
30+ /logs
31+ * /logs
Original file line number Diff line number Diff line change 2727 <groupId >com.coderqian</groupId >
2828 <artifactId >dubbo-core</artifactId >
2929 <version >0.0.1-SNAPSHOT</version >
30- <exclusions >
31- <exclusion >
32- <groupId >org.mybatis.spring.boot</groupId >
33- <artifactId >mybatis-spring-boot-starter</artifactId >
34- </exclusion >
35- <exclusion >
36- <groupId >com.alibaba</groupId >
37- <artifactId >druid-spring-boot-starter</artifactId >
38- </exclusion >
39- </exclusions >
30+ <!-- < exclusions> -- >
31+ <!-- < exclusion> -- >
32+ <!-- < groupId>org.mybatis.spring.boot</groupId> -- >
33+ <!-- < artifactId>mybatis-spring-boot-starter</artifactId> -- >
34+ <!-- < /exclusion> -- >
35+ <!-- < exclusion> -- >
36+ <!-- < groupId>com.alibaba</groupId> -- >
37+ <!-- < artifactId>druid-spring-boot-starter</artifactId> -- >
38+ <!-- < /exclusion> -- >
39+ <!-- < /exclusions> -- >
4040 </dependency >
4141 </dependencies >
4242
Original file line number Diff line number Diff line change 2828 <artifactId >spring-boot-starter-web</artifactId >
2929 </dependency >
3030
31- <!-- 引入Mybatis依赖 -->
32- <dependency >
33- <groupId >org.mybatis.spring.boot</groupId >
34- <artifactId >mybatis-spring-boot-starter</artifactId >
35- <version >1.3.2</version >
36- </dependency >
37-
38- <!-- 引入Druid依赖 -->
39- <dependency >
40- <groupId >com.alibaba</groupId >
41- <artifactId >druid-spring-boot-starter</artifactId >
42- <version >1.1.10</version >
43- </dependency >
44-
45- <!-- 引入MySQL连接依赖 -->
46- <dependency >
47- <groupId >mysql</groupId >
48- <artifactId >mysql-connector-java</artifactId >
49- </dependency >
50-
5131 <dependency >
5232 <groupId >org.projectlombok</groupId >
5333 <artifactId >lombok</artifactId >
Original file line number Diff line number Diff line change 11package com .coderqian .dubbocore ;
22
3- import org .mybatis .spring .annotation .MapperScan ;
43import org .springframework .boot .SpringApplication ;
54import org .springframework .boot .autoconfigure .SpringBootApplication ;
65
76@ SpringBootApplication
8- @ MapperScan ("com.coderqian.dubbocore.mapper" )
97public class DubboCoreApplication {
108
119 public static void main (String [] args ) {
Original file line number Diff line number Diff line change 22
33import lombok .Data ;
44
5+ import java .io .Serializable ;
6+
57/**
68 * @author qianliqing
79 * @date 2019/1/18 6:59 PM
810 * email: qianlq0824@gmail.com
911 */
1012
1113@ Data
12- public abstract class BaseEntity {
14+ public abstract class BaseEntity implements Serializable {
15+
16+ private static final long serialVersionUID = -2892487135997367620L ;
1317}
Original file line number Diff line number Diff line change 22
33import lombok .Data ;
44
5+ import java .io .Serializable ;
6+
57/**
68 * @author qianliqing
79 * @date 2019/1/18 6:59 PM
810 * email: qianlq0824@gmail.com
911 */
1012
1113@ Data
12- public class UserEntity extends BaseEntity {
14+ public class UserEntity extends BaseEntity implements Serializable {
15+
16+ private static final long serialVersionUID = 3797543733143111985L ;
1317
1418 private String id ;
1519
Original file line number Diff line number Diff line change @@ -15,21 +15,4 @@ dubbo.server=true
1515# 生产者暴露给消费者协议
1616dubbo.protocol.name =dubbo
1717# 生产者暴露给消费者端口
18- dubbo.protocol.port =20880
19-
20- # Mybatis配置
21- mybatis.type-aliases-package =com.coderqian.dubbocore.model.entity
22- mybatis.type-handlers-package =com.coderqian.dubbocore.mapper
23- mybatis.mapper-locations =classpath:mapper/*.xml
24-
25- # 配置数据源
26- spring.datasource.type =com.alibaba.druid.pool.DruidDataSource
27-
28- spring.datasource.driver-class-name =com.mysql.jdbc.Driver
29- spring.datasource.initialSize =5
30- spring.datasource.minIdle =5
31- spring.datasource.maxActive =20
32-
33- spring.datasource.url =jdbc:mysql://127.0.0。1:3306/test?useUnicode=true&characterEncoding=utf8&verifyServerCertificate=false&useSSL=false&useOldAliasMetadataBehavior=true
34- spring.datasource.username =root
35- spring.datasource.password =qlq1995/
18+ dubbo.protocol.port =20880
Original file line number Diff line number Diff line change 2929 <version >0.0.1-SNAPSHOT</version >
3030 </dependency >
3131
32+ <!-- 引入Mybatis依赖 -->
33+ <dependency >
34+ <groupId >org.mybatis.spring.boot</groupId >
35+ <artifactId >mybatis-spring-boot-starter</artifactId >
36+ <version >1.3.2</version >
37+ </dependency >
38+
39+ <!-- 引入Druid依赖 -->
40+ <dependency >
41+ <groupId >com.alibaba</groupId >
42+ <artifactId >druid-spring-boot-starter</artifactId >
43+ <version >1.1.10</version >
44+ </dependency >
45+
46+ <!-- 引入MySQL连接依赖 -->
47+ <dependency >
48+ <groupId >mysql</groupId >
49+ <artifactId >mysql-connector-java</artifactId >
50+ </dependency >
51+
3252 <dependency >
3353 <groupId >org.springframework.boot</groupId >
3454 <artifactId >spring-boot-starter-actuator</artifactId >
6989 </exclusion >
7090 </exclusions >
7191 </dependency >
92+
93+ <dependency >
94+ <groupId >org.projectlombok</groupId >
95+ <artifactId >lombok</artifactId >
96+ <version >1.18.0</version >
97+ <scope >provided</scope >
98+ </dependency >
7299 </dependencies >
73100
74101 <build >
Original file line number Diff line number Diff line change 11package com .coderqian .dubboprovider ;
22
33import com .alibaba .dubbo .config .spring .context .annotation .EnableDubbo ;
4+ import org .mybatis .spring .annotation .MapperScan ;
45import org .springframework .boot .SpringApplication ;
56import org .springframework .boot .autoconfigure .SpringBootApplication ;
7+ import org .springframework .boot .autoconfigure .jdbc .DataSourceAutoConfiguration ;
68
79@ EnableDubbo
8- @ SpringBootApplication
10+ @ SpringBootApplication (exclude = DataSourceAutoConfiguration .class )
11+ @ MapperScan ("com.coderqian.dubboprovider.mapper" )
912//@ImportResource({"classpath:dubbo/dubbo-provider.xml"})
1013public class DubboProviderApplication {
1114
Original file line number Diff line number Diff line change 1- package com .coderqian .dubbocore .configuration .config ;
1+ package com .coderqian .dubboprovider .configuration .config ;
22
33import com .alibaba .druid .pool .DruidDataSource ;
44import org .springframework .beans .factory .annotation .Value ;
You can’t perform that action at this time.
0 commit comments