Skip to content

Commit a8f8555

Browse files
committed
规范pom文件
1 parent 78f2563 commit a8f8555

File tree

2 files changed

+179
-167
lines changed

2 files changed

+179
-167
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
## 安装
44
### Maven
55
```xml
6+
67
<dependency>
7-
<groupId>io.github.ms100</groupId>
8-
<artifactId>cache-as-multi</artifactId>
9-
<version>1.0.0</version>
8+
<groupId>io.github.ms100</groupId>
9+
<artifactId>cache-as-multi</artifactId>
10+
<version>1.1.1</version>
1011
</dependency>
1112
```
1213

@@ -288,17 +289,17 @@ spring:
288289

289290
#### 针对Redis的扩展点单独配置
290291

291-
`RedisCacheManagerBuilderCustomizer` 接口,可以在 `RedisCacheManager` 生成前,自定义 `RedisCacheManagerBuilder` 想要的配置
292+
只要实现 `RedisCacheManagerBuilderCustomizer` 接口,就可以在 `RedisCacheManager` 生成前,设置 `RedisCacheManagerBuilder` 实现自定义配置
292293

293-
> 具体实现查看 `RedisCacheSpecificTimeToLiveCustomizer`
294+
> 具体实现查看 `RedisCacheCustomizer` 类
294295

295-
之后只需增加配置 cache-name-time-to-live
296+
之后只需增加如下配置
296297
```yaml
297298
spring:
298299
cache:
299300
redis:
300301
time-to-live: PT15M #默认缓存15分钟
301-
cache-as-multi:
302+
cache-as-multi: #下面是 cache-as-multi 的配置
302303
serialize-to-json: true #使用 RedisSerializer.json() 序列化
303304
cache-name-time-to-live-map: #cacheName对应的缓存时间
304305
foo: PT15S #foo缓存15秒

cache-as-multi/pom.xml

Lines changed: 171 additions & 160 deletions
Original file line numberDiff line numberDiff line change
@@ -1,171 +1,182 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

33
<project xmlns="http://maven.apache.org/POM/4.0.0" 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-
<groupId>io.github.ms100</groupId>
7-
<artifactId>cache-as-multi</artifactId>
8-
<version>1.1.0</version>
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+
<groupId>io.github.ms100</groupId>
7+
<artifactId>cache-as-multi</artifactId>
8+
<version>1.1.1</version>
99

10-
<name>cache-as-multi</name>
11-
<url>http://https://github.com/ms100/cache-as-multi</url>
12-
<description>Enhance spring cache annotation and realize the batch data caching</description>
10+
<name>Cache As Multi</name>
11+
<url>http://https://github.com/ms100/cache-as-multi</url>
12+
<description>
13+
Enhance spring cache annotation and realize the batch data caching.
14+
</description>
1315

14-
<properties>
15-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
16-
<maven.compiler.source>1.8</maven.compiler.source>
17-
<maven.compiler.target>1.8</maven.compiler.target>
18-
<spring-boot.version>2.6.8</spring-boot.version>
19-
</properties>
16+
<inceptionYear>2023</inceptionYear>
2017

21-
<dependencies>
22-
<dependency>
23-
<groupId>org.projectlombok</groupId>
24-
<artifactId>lombok</artifactId>
25-
</dependency>
26-
<dependency>
27-
<groupId>org.apache.commons</groupId>
28-
<artifactId>commons-lang3</artifactId>
29-
</dependency>
30-
<dependency>
31-
<groupId>javax.cache</groupId>
32-
<artifactId>cache-api</artifactId>
33-
<optional>true</optional>
34-
</dependency>
35-
<dependency>
36-
<groupId>com.github.ben-manes.caffeine</groupId>
37-
<artifactId>caffeine</artifactId>
38-
<optional>true</optional>
39-
</dependency>
40-
<dependency>
41-
<groupId>net.sf.ehcache</groupId>
42-
<artifactId>ehcache</artifactId>
43-
<optional>true</optional>
44-
</dependency>
45-
<!-- spring -->
46-
<dependency>
47-
<groupId>org.springframework.boot</groupId>
48-
<artifactId>spring-boot-starter-cache</artifactId>
49-
<scope>provided</scope>
50-
</dependency>
51-
<dependency>
52-
<groupId>org.springframework.boot</groupId>
53-
<artifactId>spring-boot-starter-data-redis</artifactId>
54-
<optional>true</optional>
55-
</dependency>
56-
<dependency>
57-
<groupId>com.fasterxml.jackson.core</groupId>
58-
<artifactId>jackson-databind</artifactId>
59-
<optional>true</optional>
60-
</dependency>
61-
<dependency>
62-
<groupId>org.springframework.boot</groupId>
63-
<artifactId>spring-boot-configuration-processor</artifactId>
64-
<optional>true</optional>
65-
</dependency>
66-
<dependency>
67-
<groupId>org.springframework.boot</groupId>
68-
<artifactId>spring-boot-starter-test</artifactId>
69-
<scope>test</scope>
70-
</dependency>
71-
</dependencies>
18+
<licenses>
19+
<license>
20+
<name>The Apache Software License, Version 2.0</name>
21+
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
22+
</license>
23+
</licenses>
24+
<scm>
25+
<connection>scm:git:https://github.com/ms100/cache-as-multi.git</connection>
26+
<developerConnection>scm:git:https://github.com/ms100/cache-as-multi.git</developerConnection>
27+
<url>https://github.com/ms100/cache-as-multi</url>
28+
<tag>HEAD</tag>
29+
</scm>
30+
<developers>
31+
<developer>
32+
<name>zhumengshuai</name>
33+
<email>[email protected]</email>
34+
</developer>
35+
</developers>
36+
37+
<issueManagement>
38+
<system>github</system>
39+
<url>https://github.com/ms100/cache-as-multi/issues</url>
40+
</issueManagement>
41+
42+
<properties>
43+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
44+
<maven.compiler.source>1.8</maven.compiler.source>
45+
<maven.compiler.target>1.8</maven.compiler.target>
46+
<spring-boot.version>2.6.8</spring-boot.version>
47+
</properties>
7248

73-
<dependencyManagement>
7449
<dependencies>
75-
<dependency>
76-
<groupId>org.springframework.boot</groupId>
77-
<artifactId>spring-boot-dependencies</artifactId>
78-
<version>${spring-boot.version}</version>
79-
<type>pom</type>
80-
<scope>import</scope>
81-
</dependency>
50+
<dependency>
51+
<groupId>org.projectlombok</groupId>
52+
<artifactId>lombok</artifactId>
53+
</dependency>
54+
<dependency>
55+
<groupId>org.apache.commons</groupId>
56+
<artifactId>commons-lang3</artifactId>
57+
</dependency>
58+
<dependency>
59+
<groupId>javax.cache</groupId>
60+
<artifactId>cache-api</artifactId>
61+
<optional>true</optional>
62+
</dependency>
63+
<dependency>
64+
<groupId>com.github.ben-manes.caffeine</groupId>
65+
<artifactId>caffeine</artifactId>
66+
<optional>true</optional>
67+
</dependency>
68+
<dependency>
69+
<groupId>net.sf.ehcache</groupId>
70+
<artifactId>ehcache</artifactId>
71+
<optional>true</optional>
72+
</dependency>
73+
<!-- spring -->
74+
<dependency>
75+
<groupId>org.springframework.boot</groupId>
76+
<artifactId>spring-boot-starter-cache</artifactId>
77+
<scope>provided</scope>
78+
</dependency>
79+
<dependency>
80+
<groupId>org.springframework.boot</groupId>
81+
<artifactId>spring-boot-starter-data-redis</artifactId>
82+
<optional>true</optional>
83+
</dependency>
84+
<dependency>
85+
<groupId>com.fasterxml.jackson.core</groupId>
86+
<artifactId>jackson-databind</artifactId>
87+
<optional>true</optional>
88+
</dependency>
89+
<dependency>
90+
<groupId>org.springframework.boot</groupId>
91+
<artifactId>spring-boot-configuration-processor</artifactId>
92+
<optional>true</optional>
93+
</dependency>
94+
<dependency>
95+
<groupId>org.springframework.boot</groupId>
96+
<artifactId>spring-boot-starter-test</artifactId>
97+
<scope>test</scope>
98+
</dependency>
8299
</dependencies>
83-
</dependencyManagement>
84100

85-
<distributionManagement>
86-
<snapshotRepository>
87-
<id>ossrh</id>
88-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
89-
</snapshotRepository>
90-
<repository>
91-
<id>ossrh</id>
92-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
93-
</repository>
94-
</distributionManagement>
95-
<build>
96-
<plugins>
97-
<!-- source -->
98-
<plugin>
99-
<groupId>org.apache.maven.plugins</groupId>
100-
<artifactId>maven-source-plugin</artifactId>
101-
<version>3.2.1</version>
102-
<executions>
103-
<execution>
104-
<id>attach-sources</id>
105-
<goals>
106-
<goal>jar-no-fork</goal>
107-
</goals>
108-
</execution>
109-
</executions>
110-
</plugin>
111-
<!-- javadoc -->
112-
<plugin>
113-
<groupId>org.apache.maven.plugins</groupId>
114-
<artifactId>maven-javadoc-plugin</artifactId>
115-
<version>3.4.1</version>
116-
<executions>
117-
<execution>
118-
<id>attach-javadocs</id>
119-
<goals>
120-
<goal>jar</goal>
121-
</goals>
122-
</execution>
123-
</executions>
124-
</plugin>
125-
<!-- gpg -->
126-
<plugin>
127-
<groupId>org.apache.maven.plugins</groupId>
128-
<artifactId>maven-gpg-plugin</artifactId>
129-
<version>3.0.1</version>
130-
<executions>
131-
<execution>
132-
<id>sign-artifacts</id>
133-
<phase>verify</phase>
134-
<goals>
135-
<goal>sign</goal>
136-
</goals>
137-
</execution>
138-
</executions>
139-
</plugin>
140-
<!-- deploy -->
141-
<plugin>
142-
<groupId>org.sonatype.plugins</groupId>
143-
<artifactId>nexus-staging-maven-plugin</artifactId>
144-
<version>1.6.13</version>
145-
<extensions>true</extensions>
146-
<configuration>
147-
<serverId>ossrh</serverId>
148-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
149-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
150-
</configuration>
151-
</plugin>
152-
</plugins>
153-
</build>
154-
<licenses>
155-
<license>
156-
<name>The Apache Software License, Version 2.0</name>
157-
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
158-
</license>
159-
</licenses>
160-
<scm>
161-
<connection>scm:git:https://github.com/ms100/cache-as-multi.git</connection>
162-
<developerConnection>scm:git:https://github.com/ms100/cache-as-multi.git</developerConnection>
163-
<url>git:https://github.com/ms100/cache-as-multi.git</url>
164-
</scm>
165-
<developers>
166-
<developer>
167-
<name>zhumengshuai</name>
168-
<email>[email protected]</email>
169-
</developer>
170-
</developers>
101+
<dependencyManagement>
102+
<dependencies>
103+
<dependency>
104+
<groupId>org.springframework.boot</groupId>
105+
<artifactId>spring-boot-dependencies</artifactId>
106+
<version>${spring-boot.version}</version>
107+
<type>pom</type>
108+
<scope>import</scope>
109+
</dependency>
110+
</dependencies>
111+
</dependencyManagement>
112+
113+
<distributionManagement>
114+
<snapshotRepository>
115+
<id>ossrh</id>
116+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
117+
</snapshotRepository>
118+
<repository>
119+
<id>ossrh</id>
120+
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
121+
</repository>
122+
</distributionManagement>
123+
<build>
124+
<plugins>
125+
<!-- source -->
126+
<plugin>
127+
<groupId>org.apache.maven.plugins</groupId>
128+
<artifactId>maven-source-plugin</artifactId>
129+
<version>3.2.1</version>
130+
<executions>
131+
<execution>
132+
<id>attach-sources</id>
133+
<goals>
134+
<goal>jar-no-fork</goal>
135+
</goals>
136+
</execution>
137+
</executions>
138+
</plugin>
139+
<!-- javadoc -->
140+
<plugin>
141+
<groupId>org.apache.maven.plugins</groupId>
142+
<artifactId>maven-javadoc-plugin</artifactId>
143+
<version>3.4.1</version>
144+
<executions>
145+
<execution>
146+
<id>attach-javadocs</id>
147+
<goals>
148+
<goal>jar</goal>
149+
</goals>
150+
</execution>
151+
</executions>
152+
</plugin>
153+
<!-- gpg -->
154+
<plugin>
155+
<groupId>org.apache.maven.plugins</groupId>
156+
<artifactId>maven-gpg-plugin</artifactId>
157+
<version>3.0.1</version>
158+
<executions>
159+
<execution>
160+
<id>sign-artifacts</id>
161+
<phase>verify</phase>
162+
<goals>
163+
<goal>sign</goal>
164+
</goals>
165+
</execution>
166+
</executions>
167+
</plugin>
168+
<!-- deploy -->
169+
<plugin>
170+
<groupId>org.sonatype.plugins</groupId>
171+
<artifactId>nexus-staging-maven-plugin</artifactId>
172+
<version>1.6.13</version>
173+
<extensions>true</extensions>
174+
<configuration>
175+
<serverId>ossrh</serverId>
176+
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
177+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
178+
</configuration>
179+
</plugin>
180+
</plugins>
181+
</build>
171182
</project>

0 commit comments

Comments
 (0)