Skip to content

Commit 39ad15d

Browse files
committed
release: prepare opensabre framework 0.4.0
1 parent 58482a9 commit 39ad15d

34 files changed

Lines changed: 630 additions & 149 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
66

77
Opensabre is a microservices development platform based on Spring Cloud 2023, integrating Spring Security, Spring Cloud Alibaba, and other components. It provides foundational RBAC permission management, authorization authentication, gateway management, service governance, audit logging, and other system management applications.
88

9-
**Current Version**: 0.3.0
9+
**Current Version**: 0.4.0
1010

1111
This is the framework layer of the Opensabre monorepo - it provides reusable starter modules that are published to Maven Central and consumed by application services (base-organization, base-authorization, base-sysadmin, etc.).
1212

opensabre-base-dependencies/pom.xml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@
9494
<artifactId>jetcache-starter-redis-lettuce</artifactId>
9595
<version>${jetcache-starter-redis.version}</version>
9696
</dependency>
97+
<dependency>
98+
<groupId>com.alicp.jetcache</groupId>
99+
<artifactId>jetcache-autoconfigure</artifactId>
100+
<version>${jetcache-starter-redis.version}</version>
101+
</dependency>
97102
<!-- WEB -->
98103
<dependency>
99104
<groupId>jakarta.servlet</groupId>
@@ -165,6 +170,11 @@
165170
<artifactId>opensabre-starter-eda</artifactId>
166171
<version>${revision}</version>
167172
</dependency>
173+
<dependency>
174+
<groupId>io.github.opensabre</groupId>
175+
<artifactId>opensabre-starter-governance</artifactId>
176+
<version>${revision}</version>
177+
</dependency>
168178
<dependency>
169179
<groupId>io.github.opensabre</groupId>
170180
<artifactId>opensabre-starter-webmvc</artifactId>
@@ -208,12 +218,6 @@
208218
<artifactId>mysql-connector-j</artifactId>
209219
<version>${mysql-connector-j.version}</version>
210220
</dependency>
211-
<!--Swagger - RESTFULL API文档-->
212-
<dependency>
213-
<groupId>io.swagger.core.v3</groupId>
214-
<artifactId>swagger-annotations-jakarta</artifactId>
215-
<version>${swagger-annotations.version}</version>
216-
</dependency>
217221
<!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
218222
<dependency>
219223
<groupId>com.google.guava</groupId>

opensabre-starter-boot/pom.xml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -126,17 +126,7 @@
126126
<!--opensabre 测试-->
127127
<dependency>
128128
<groupId>org.springframework.boot</groupId>
129-
<artifactId>spring-boot-test</artifactId>
130-
<scope>test</scope>
131-
</dependency>
132-
<dependency>
133-
<groupId>io.github.opensabre</groupId>
134-
<artifactId>opensabre-test</artifactId>
135-
<scope>test</scope>
136-
</dependency>
137-
<dependency>
138-
<groupId>org.springframework</groupId>
139-
<artifactId>spring-test</artifactId>
129+
<artifactId>spring-boot-starter-test</artifactId>
140130
<scope>test</scope>
141131
</dependency>
142132
<dependency>

opensabre-starter-boot/src/main/java/io/github/opensabre/boot/annotations/EnabledAudit.java

Lines changed: 0 additions & 17 deletions
This file was deleted.

opensabre-starter-boot/src/main/java/io/github/opensabre/boot/config/OpensabreServiceConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
import io.github.opensabre.boot.event.OpensabreStartedEventHandler;
55
import io.github.opensabre.boot.rest.MappingInfoHandler;
66
import org.springframework.boot.autoconfigure.AutoConfiguration;
7+
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
78
import org.springframework.context.annotation.Import;
89

910
/**
1011
* Opensabre Rest信息事件通知配置类
1112
*/
1213
@AutoConfiguration
14+
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
1315
@Import({OpensabreStartedEventHandler.class, MappingInfoHandler.class})
1416
public class OpensabreServiceConfig {
1517
}

opensabre-starter-boot/src/main/java/io/github/opensabre/boot/event/DefaultAuditEventHandler.java

Lines changed: 0 additions & 17 deletions
This file was deleted.

opensabre-starter-cache/pom.xml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,9 @@
3434
<groupId>com.alicp.jetcache</groupId>
3535
<artifactId>jetcache-starter-redis-lettuce</artifactId>
3636
</dependency>
37-
<!--常用json包-->
3837
<dependency>
39-
<groupId>com.fasterxml.jackson.core</groupId>
40-
<artifactId>jackson-annotations</artifactId>
41-
</dependency>
42-
<dependency>
43-
<groupId>com.fasterxml.jackson.core</groupId>
44-
<artifactId>jackson-databind</artifactId>
45-
</dependency>
46-
<!--使用 lombok 简化 Java 代码-->
47-
<dependency>
48-
<groupId>org.projectlombok</groupId>
49-
<artifactId>lombok</artifactId>
38+
<groupId>com.alicp.jetcache</groupId>
39+
<artifactId>jetcache-autoconfigure</artifactId>
5040
</dependency>
5141
</dependencies>
52-
</project>
42+
</project>
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?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"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<parent>
8+
<artifactId>opensabre-framework</artifactId>
9+
<groupId>io.github.opensabre</groupId>
10+
<version>${revision}</version>
11+
</parent>
12+
13+
<artifactId>opensabre-starter-governance</artifactId>
14+
<packaging>jar</packaging>
15+
16+
<name>opensabre-starter-governance</name>
17+
<description>Opensabre governance starter for audit and rate limit annotations</description>
18+
19+
<dependencyManagement>
20+
<dependencies>
21+
<dependency>
22+
<groupId>io.github.opensabre</groupId>
23+
<artifactId>opensabre-base-dependencies</artifactId>
24+
<version>${revision}</version>
25+
<type>pom</type>
26+
<scope>import</scope>
27+
</dependency>
28+
</dependencies>
29+
</dependencyManagement>
30+
31+
<dependencies>
32+
<dependency>
33+
<groupId>io.github.opensabre</groupId>
34+
<artifactId>opensabre-starter-boot</artifactId>
35+
</dependency>
36+
<dependency>
37+
<groupId>io.github.opensabre</groupId>
38+
<artifactId>opensabre-starter-rpc</artifactId>
39+
</dependency>
40+
<dependency>
41+
<groupId>io.github.opensabre</groupId>
42+
<artifactId>opensabre-starter-webmvc</artifactId>
43+
</dependency>
44+
<dependency>
45+
<groupId>org.springframework.boot</groupId>
46+
<artifactId>spring-boot-starter-aop</artifactId>
47+
</dependency>
48+
<dependency>
49+
<groupId>org.aspectj</groupId>
50+
<artifactId>aspectjweaver</artifactId>
51+
</dependency>
52+
<dependency>
53+
<groupId>jakarta.servlet</groupId>
54+
<artifactId>jakarta.servlet-api</artifactId>
55+
<scope>provided</scope>
56+
</dependency>
57+
<dependency>
58+
<groupId>org.projectlombok</groupId>
59+
<artifactId>lombok</artifactId>
60+
</dependency>
61+
<dependency>
62+
<groupId>org.springframework.boot</groupId>
63+
<artifactId>spring-boot-starter-test</artifactId>
64+
<scope>test</scope>
65+
</dependency>
66+
</dependencies>
67+
</project>

opensabre-starter-boot/src/main/java/io/github/opensabre/boot/annotations/Audit.java renamed to opensabre-starter-governance/src/main/java/io/github/opensabre/governance/audit/annotations/Audit.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
package io.github.opensabre.boot.annotations;
1+
package io.github.opensabre.governance.audit.annotations;
22

3-
import java.lang.annotation.*;
3+
import java.lang.annotation.Documented;
4+
import java.lang.annotation.ElementType;
5+
import java.lang.annotation.Retention;
6+
import java.lang.annotation.RetentionPolicy;
7+
import java.lang.annotation.Target;
48

59
/**
610
* 审计日志注解
@@ -39,4 +43,4 @@
3943
* 目标对象关键信息,可支持 spel
4044
*/
4145
String key() default "";
42-
}
46+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package io.github.opensabre.governance.audit.annotations;
2+
3+
import io.github.opensabre.governance.audit.aspect.AuditAspect;
4+
import io.github.opensabre.governance.audit.event.DefaultAuditEventHandler;
5+
import org.springframework.context.annotation.Import;
6+
7+
import java.lang.annotation.Documented;
8+
import java.lang.annotation.ElementType;
9+
import java.lang.annotation.Retention;
10+
import java.lang.annotation.RetentionPolicy;
11+
import java.lang.annotation.Target;
12+
13+
/**
14+
* 审计日志注解
15+
*/
16+
@Target(ElementType.TYPE)
17+
@Retention(RetentionPolicy.RUNTIME)
18+
@Documented
19+
@Import({AuditAspect.class, DefaultAuditEventHandler.class})
20+
public @interface EnabledAudit {
21+
}

0 commit comments

Comments
 (0)