Skip to content

Commit 0f97f29

Browse files
committed
升级发布0.0.2版本
1 parent e504180 commit 0f97f29

File tree

21 files changed

+304
-75
lines changed

21 files changed

+304
-75
lines changed

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<dependency>
1919
<groupId>io.github.weihubeats</groupId>
2020
<artifactId>spring-boot-nebula-web</artifactId>
21-
<version>0.0.01</version>
21+
<version>0.0.2</version>
2222
</dependency>
2323
```
2424
2. 编写一个启动类
@@ -76,7 +76,7 @@
7676
<dependency>
7777
<groupId>io.github.weihubeats</groupId>
7878
<artifactId>spring-boot-nebula-web</artifactId>
79-
<version>0.0.01</version>
79+
<version>0.0.2</version>
8080
</dependency>
8181
```
8282

@@ -112,7 +112,7 @@
112112
<dependency>
113113
<groupId>io.github.weihubeats</groupId>
114114
<artifactId>spring-boot-nebula-web</artifactId>
115-
<version>0.0.01</version>
115+
<version>0.0.2</version>
116116
</dependency>
117117
```
118118

@@ -121,7 +121,7 @@
121121
<dependency>
122122
<groupId>io.github.weihubeats</groupId>
123123
<artifactId>spring-boot-nebula-distribute-lock</artifactId>
124-
<version>0.0.01</version>
124+
<version>0.0.2</version>
125125
</dependency>
126126
```
127127

@@ -130,7 +130,7 @@
130130
<dependency>
131131
<groupId>io.github.weihubeats</groupId>
132132
<artifactId>spring-boot-nebula-aggregate</artifactId>
133-
<version>0.0.01</version>
133+
<version>0.0.2</version>
134134
</dependency>
135135
```
136136

@@ -139,7 +139,7 @@
139139
<dependency>
140140
<groupId>io.github.weihubeats</groupId>
141141
<artifactId>spring-boot-nebula-mybatis-plus</artifactId>
142-
<version>0.0.01</version>
142+
<version>0.0.2</version>
143143
</dependency>
144144
```
145145

pom.xml

+9-9
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,13 @@
2525
</modules>
2626

2727
<properties>
28-
<revision>0.0.01</revision>
28+
<revision>0.0.2</revision>
2929
<flatten-maven-plugin.version>1.2.7</flatten-maven-plugin.version>
3030
<maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
3131
<maven.compiler.source>11</maven.compiler.source>
3232
<maven.compiler.target>11</maven.compiler.target>
3333
<spotless-maven-plugin.version>2.43.0</spotless-maven-plugin.version>
3434
</properties>
35-
36-
<dependencies>
37-
<dependency>
38-
<groupId>org.springframework.boot</groupId>
39-
<artifactId>spring-boot-starter-test</artifactId>
40-
<scope>test</scope>
41-
</dependency>
42-
</dependencies>
4335

4436
<dependencyManagement>
4537
<dependencies>
@@ -53,6 +45,14 @@
5345
</dependencies>
5446
</dependencyManagement>
5547

48+
<dependencies>
49+
<dependency>
50+
<groupId>org.springframework.boot</groupId>
51+
<artifactId>spring-boot-starter-test</artifactId>
52+
<scope>test</scope>
53+
</dependency>
54+
</dependencies>
55+
5656
<build>
5757
<plugins>
5858
<plugin>

spring-boot-nebula-common/src/main/java/com/nebula/base/model/NebulaPageRes.java

-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ public static <T> NebulaPageRes<T> of(Collection<T> list, long total, int pageSi
8282
page.setPageSize(pageSize);
8383
return page;
8484
}
85-
86-
8785

8886
/**
8987
* 内存分页

spring-boot-nebula-dependencies/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<description>spring boot 基础组件,快速构建spring boot项目</description>
1313

1414
<properties>
15-
<revision>0.0.01</revision>
15+
<revision>0.0.2</revision>
1616
<maven.compiler.source>11</maven.compiler.source>
1717
<maven.compiler.target>11</maven.compiler.target>
1818
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

spring-boot-nebula-mybatis/pom.xml

+2-3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
<groupId>io.github.weihubeats</groupId>
2323
<artifactId>spring-boot-nebula-common</artifactId>
2424
</dependency>
25-
26-
25+
2726
<dependency>
2827
<groupId>com.baomidou</groupId>
2928
<artifactId>mybatis-plus-boot-starter</artifactId>
@@ -44,7 +43,7 @@
4443
<groupId>org.projectlombok</groupId>
4544
<artifactId>lombok</artifactId>
4645
</dependency>
47-
46+
4847
</dependencies>
4948

5049
</project>

spring-boot-nebula-mybatis/src/main/java/com/nebula/mybatis/entity/NebulaMetaObjectHandler.java

+19-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
118
package com.nebula.mybatis.entity;
219

320
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
@@ -10,13 +27,13 @@
1027
* @description:
1128
*/
1229
public class NebulaMetaObjectHandler implements MetaObjectHandler {
13-
30+
1431
@Override
1532
public void insertFill(MetaObject metaObject) {
1633
this.strictInsertFill(metaObject, "addTime", LocalDateTime::now, LocalDateTime.class);
1734
this.strictInsertFill(metaObject, "updateTime", LocalDateTime::now, LocalDateTime.class);
1835
}
19-
36+
2037
@Override
2138
public void updateFill(MetaObject metaObject) {
2239
this.strictUpdateFill(metaObject, "updateTime", LocalDateTime::now, LocalDateTime.class);

spring-boot-nebula-mybatis/src/main/java/com/nebula/mybatis/utils/PageHelperUtils.java

+19-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
118
package com.nebula.mybatis.utils;
219

320
import com.github.pagehelper.Page;
@@ -12,11 +29,11 @@
1229
* @description:
1330
*/
1431
public class PageHelperUtils {
15-
32+
1633
public static <E, T extends NebulaPageQuery> Page<E> startPage(T e) {
1734
return PageHelper.startPage(e.getPageIndex(), e.getPageSize());
1835
}
19-
36+
2037
public static <T> NebulaPageRes<T> of(Collection<T> list, Page page) {
2138
NebulaPageRes<T> pageResponse = new NebulaPageRes();
2239
pageResponse.setList(list);

spring-boot-nebula-samples/spring-boot-nebula-mybatis-sample/pom.xml

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
43
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
54
<modelVersion>4.0.0</modelVersion>
65
<parent>
@@ -11,9 +10,7 @@
1110

1211
<artifactId>spring-boot-nebula-mybatis-sample</artifactId>
1312

14-
<properties>
15-
16-
</properties>
13+
<properties />
1714

1815
<dependencies>
1916

@@ -33,7 +30,6 @@
3330
<scope>runtime</scope>
3431
</dependency>
3532

36-
3733
</dependencies>
3834

39-
</project>
35+
</project>

spring-boot-nebula-samples/spring-boot-nebula-mybatis-sample/src/main/java/com/nebula/mybatis/sample/config/MybatisPlusConfig.java

+20-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
118
package com.nebula.mybatis.sample.config;
219

320
import com.baomidou.mybatisplus.core.MybatisConfiguration;
@@ -21,10 +38,9 @@
2138
@Configuration
2239
@MapperScan({"com.nebula.mybatis.sample.dao.mapper"})
2340
public class MybatisPlusConfig {
24-
25-
41+
2642
@Bean
27-
public MybatisSqlSessionFactoryBean mybatisSqlSessionFactoryBean (DataSource dataSource) throws Exception{
43+
public MybatisSqlSessionFactoryBean mybatisSqlSessionFactoryBean(DataSource dataSource) throws Exception {
2844
MybatisSqlSessionFactoryBean factoryBean = new MybatisSqlSessionFactoryBean();
2945
factoryBean.setDataSource(dataSource);
3046
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
@@ -33,7 +49,7 @@ public MybatisSqlSessionFactoryBean mybatisSqlSessionFactoryBean (DataSource dat
3349
// 实体类别名 别名冲突暂时不使用别名 WarehouseLocationDO
3450
factoryBean.setTypeAliasesPackage("com.nebula.mybatis.sample.entity");
3551
MybatisConfiguration configuration = new MybatisConfiguration();
36-
//开启下划线转驼峰
52+
// 开启下划线转驼峰
3753
configuration.setMapUnderscoreToCamelCase(true);
3854
configuration.setJdbcTypeForNull(JdbcType.NULL);
3955
GlobalConfig globalConfig = new GlobalConfig();

spring-boot-nebula-samples/spring-boot-nebula-mybatis-sample/src/main/java/com/nebula/mybatis/sample/controller/StudentController.java

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
118
package com.nebula.mybatis.sample.controller;
219

320
import com.nebula.base.model.NebulaPageRes;

spring-boot-nebula-samples/spring-boot-nebula-mybatis-sample/src/main/java/com/nebula/mybatis/sample/converter/StudentConverter.java

+18-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
118
package com.nebula.mybatis.sample.converter;
219

320
import com.nebula.mybatis.sample.dao.entity.StudentDO;
@@ -12,12 +29,11 @@
1229
*/
1330
public class StudentConverter {
1431

15-
1632
public static List<StudentVO> toStudentVOs(List<StudentDO> dos) {
1733
List<StudentVO> vos = dos.stream().map(StudentConverter::toStudentVO).collect(Collectors.toList());
1834
return vos;
1935
}
20-
36+
2137
public static StudentVO toStudentVO(StudentDO studentDO) {
2238
StudentVO studentVO = new StudentVO();
2339
studentVO.setId(studentDO.getId());

spring-boot-nebula-samples/spring-boot-nebula-mybatis-sample/src/main/java/com/nebula/mybatis/sample/dao/StudentDAO.java

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
118
package com.nebula.mybatis.sample.dao;
219

320
import com.baomidou.mybatisplus.extension.service.IService;
@@ -13,6 +30,5 @@
1330
*/
1431
public interface StudentDAO extends IService<StudentDO> {
1532

16-
1733
NebulaPageRes<StudentVO> getStudents(StudentDTO dto);
1834
}

spring-boot-nebula-samples/spring-boot-nebula-mybatis-sample/src/main/java/com/nebula/mybatis/sample/dao/entity/StudentDO.java

+21-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
118
package com.nebula.mybatis.sample.dao.entity;
219

320
import com.baomidou.mybatisplus.annotation.IdType;
@@ -13,12 +30,12 @@
1330
@Data
1431
@TableName("student")
1532
public class StudentDO {
16-
33+
1734
@TableId(type = IdType.AUTO)
1835
private Long id;
19-
36+
2037
private String name;
21-
38+
2239
private Integer age;
23-
40+
2441
}

0 commit comments

Comments
 (0)