Skip to content

Commit ff089bc

Browse files
committed
clean code and update version 1.4.2
1 parent 7e9bae7 commit ff089bc

File tree

18 files changed

+23
-27
lines changed

18 files changed

+23
-27
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
1010
本框架基于springboot为提供领域驱动设计与事件风暴开发落地,提供的范式开源框架。
1111

12-
## Project Modules Description | 项目模块介绍
12+
## Project Modules Description | 项目模块介绍
1313

14-
* springboot-example | 示例项目
14+
* springboot-example | 示例项目
1515
* springboot-starter | Springboot领域驱动框架
16-
* springboot-starter-data-fast | 快速数据呈现框架
16+
* springboot-starter-data-fast | 快速数据呈现框架
1717
* springboot-starter-id-generator | Id自增策略框架
1818
* springboot-starter-security-jwt | security&jwt权限框架
1919

@@ -132,5 +132,5 @@ For further reference, please consider the following sections:
132132
* [spring-security-without-the-websecurityconfigureradapter](https://spring.io/blog/2022/02/21/spring-security-without-the-websecurityconfigureradapter)
133133
* [springboot-security&jwt](https://blog.csdn.net/u014553029/article/details/112759382)
134134
* [Meituan-Dianping/Leaf](https://github.com/Meituan-Dianping/Leaf)
135-
* [SpringBoot Test](https://spring.io/guides/gs/testing-web/)
135+
* [SpringBoot Test](https://spring.io/guides/gs/testing-web/)
136136
* [SpringBoot Web Test](https://spring.io/guides/gs/testing-web/)

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<groupId>com.codingapi.springboot</groupId>
1414
<artifactId>springboot-parent</artifactId>
15-
<version>1.4.1</version>
15+
<version>1.4.2</version>
1616

1717
<url>https://github.com/codingapi/springboot-framewrok</url>
1818
<name>springboot-parent</name>

springboot-example/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.codingapi.springboot</groupId>
77
<artifactId>springboot-parent</artifactId>
8-
<version>1.4.1</version>
8+
<version>1.4.2</version>
99
</parent>
1010
<artifactId>springboot-example</artifactId>
1111

springboot-starter-data-fast/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-parent</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>1.4.1</version>
8+
<version>1.4.2</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

springboot-starter-data-fast/src/main/java/com/codingapi/springboot/fast/executor/JpaExecutor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public Object execute(String hql, String countHql, Object[] args, Class<?> retur
2020

2121
if (returnType.equals(SingleResponse.class)) {
2222
List list = (List) query.getResultList();
23-
return list==null&&list.size()>0?SingleResponse.of(list.get(0)):SingleResponse.empty();
23+
return list == null && list.size() > 0 ? SingleResponse.of(list.get(0)) : SingleResponse.empty();
2424
}
2525

2626
if (returnType.equals(MultiResponse.class)) {

springboot-starter-data-fast/src/test/java/com/codingapi/springboot/fast/DataFastApplication.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
public class DataFastApplication {
88

99
public static void main(String[] args) {
10-
SpringApplication.run(DataFastApplication.class,args);
10+
SpringApplication.run(DataFastApplication.class, args);
1111
}
1212
}

springboot-starter-data-fast/src/test/java/com/codingapi/springboot/fast/DataFastApplicationTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ void findAll() throws Exception {
2424

2525
@Test
2626
void findById() throws Exception {
27-
mockMvc.perform(get("/demo/getById").param("id","1").contentType(MediaType.APPLICATION_JSON)).andExpect(status().isOk());
27+
mockMvc.perform(get("/demo/getById").param("id", "1").contentType(MediaType.APPLICATION_JSON)).andExpect(status().isOk());
2828
}
2929

3030
@Test
3131
void findPage() throws Exception {
32-
mockMvc.perform(get("/demo/findPage").param("pageSize","20").param("current","1").contentType(MediaType.APPLICATION_JSON)).andExpect(status().isOk());
32+
mockMvc.perform(get("/demo/findPage").param("pageSize", "20").param("current", "1").contentType(MediaType.APPLICATION_JSON)).andExpect(status().isOk());
3333
}
3434
}

springboot-starter-data-fast/src/test/java/com/codingapi/springboot/fast/query/FastDemoQuery.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
@FastController
1212
public interface FastDemoQuery {
1313

14-
@FastMapping(value = "select d from Demo d",mapping = "/demo/findAll")
14+
@FastMapping(value = "select d from Demo d", mapping = "/demo/findAll")
1515
MultiResponse<Demo> findAll();
1616

17-
@FastMapping(value = "select d from Demo d where d.id = ?1",mapping = "/demo/getById")
17+
@FastMapping(value = "select d from Demo d where d.id = ?1", mapping = "/demo/getById")
1818
SingleResponse<Demo> getById(@RequestParam("id") int id);
1919

20-
@FastMapping(value = "select d from Demo d",countQuery = "select count(d) from Demo d",mapping = "/demo/findPage")
20+
@FastMapping(value = "select d from Demo d", countQuery = "select count(d) from Demo d", mapping = "/demo/findPage")
2121
MultiResponse<Demo> findPage(PageRequest pageRequest);
2222

2323
}
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
server.port=8088
2-
32
spring.datasource.driver-class-name=org.h2.Driver
43
spring.datasource.url=jdbc:h2:file:./test.db
5-
64
spring.jpa.hibernate.ddl-auto=create-drop
75
spring.jpa.show-sql=true

springboot-starter-id-generator/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-parent</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>1.4.1</version>
8+
<version>1.4.2</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

springboot-starter-id-generator/src/test/java/com/codingapi/springboot/generator/IdGenerateServiceTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
import org.junit.jupiter.api.Test;
55
import org.springframework.boot.test.context.SpringBootTest;
66

7-
import static org.junit.jupiter.api.Assertions.*;
7+
import static org.junit.jupiter.api.Assertions.assertTrue;
88

99
@Slf4j
1010
@SpringBootTest
1111
class IdGenerateServiceTest {
1212

1313
@Test
1414
void generateId() {
15-
for(int i=0;i<1000;i++) {
15+
for (int i = 0; i < 1000; i++) {
1616
long id = IdGeneratorContext.getInstance().generateId(IdGenerateServiceTest.class);
1717
log.info("id=>{}", id);
1818
assertTrue(id > 0, "id generator error.");

springboot-starter-id-generator/src/test/java/com/codingapi/springboot/generator/IdGeneratorApplication.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
public class IdGeneratorApplication {
88

99
public static void main(String[] args) {
10-
SpringApplication.run(IdGeneratorApplication.class,args);
10+
SpringApplication.run(IdGeneratorApplication.class, args);
1111
}
1212
}

springboot-starter-security-jwt/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<artifactId>springboot-parent</artifactId>
88
<groupId>com.codingapi.springboot</groupId>
9-
<version>1.4.1</version>
9+
<version>1.4.2</version>
1010
</parent>
1111

1212
<artifactId>springboot-starter-security-jwt</artifactId>

springboot-starter-security-jwt/src/test/java/com/codingapi/springboot/security/SecurityJwtApplication.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
public class SecurityJwtApplication {
88

99
public static void main(String[] args) {
10-
SpringApplication.run(SecurityJwtApplication.class,args);
10+
SpringApplication.run(SecurityJwtApplication.class, args);
1111
}
1212
}

springboot-starter-security-jwt/src/test/java/com/codingapi/springboot/security/SecurityJwtApplicationTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class SecurityJwtApplicationTest {
88

99

1010
@Test
11-
void test(){
11+
void test() {
1212

1313
}
1414

Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
server.port=8088
2-
32
spring.datasource.driver-class-name=org.h2.Driver
43
spring.datasource.url=jdbc:h2:file:./test.db
5-
64
spring.jpa.hibernate.ddl-auto=create-drop
75
spring.jpa.show-sql=true

springboot-starter/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.codingapi.springboot</groupId>
77
<artifactId>springboot-parent</artifactId>
8-
<version>1.4.1</version>
8+
<version>1.4.2</version>
99
</parent>
1010
<artifactId>springboot-starter</artifactId>
1111

springboot-starter/src/test/java/com/codingapi/springboot/framework/FrameWorkApplication.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
public class FrameWorkApplication {
88

99
public static void main(String[] args) {
10-
SpringApplication.run(FrameWorkApplication.class,args);
10+
SpringApplication.run(FrameWorkApplication.class, args);
1111
}
1212
}

0 commit comments

Comments
 (0)