Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/MavenDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:

env:
APPLICATION_NAME: "starfish"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

# APPLICATION_VERSION: "1.0.0"
# APPLICATION_ENV: "dev"

Expand All @@ -33,18 +35,14 @@ jobs:
cache: maven

- name: Package
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: mvn --batch-mode --update-snapshots package -Dmaven.test.skip=true

# - name: Install
# env:
# GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# run: mvn --batch-mode --update-snapshots install -Dmaven.test.skip=true

- name: Deploy
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# env:
# GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: mvn --batch-mode --update-snapshots deploy -Dmaven.test.skip=true

# - name: Build With Maven
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@
.tmp
*.tar.gz
/target/*
hs_err_pid*
hs_err_pid*
/target/
target
77 changes: 37 additions & 40 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.4</version>
<version>4.0.0</version>
</parent>
<groupId>com.github.sunkolin</groupId>
<artifactId>starfish</artifactId>
<version>1.0.0</version>
<version>2.0.2-SNAPSHOT</version>
<packaging>jar</packaging>
<name>starfish</name>
<description>starfish</description>
Expand All @@ -33,12 +33,23 @@
</scm>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>17</java.version>
<spring.cloud.version>2023.0.1</spring.cloud.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<repositories>
<repository>
<id>aliyun</id>
<name>aliyun</name>
<layout>default</layout>
<url>https://maven.aliyun.com/repository/central</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
Expand All @@ -49,15 +60,6 @@
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>aliyun</id>
<name>aliyun</name>
<layout>default</layout>
<url>https://maven.aliyun.com/repository/public</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
Expand All @@ -75,18 +77,12 @@

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring.cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

</dependencies>
</dependencyManagement>

<dependencies>
<!--spring boot-->
<!-- spring-boot -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
Expand All @@ -111,19 +107,14 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-aop-aspectj</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
Expand All @@ -134,15 +125,10 @@
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-quartz</artifactId>
<exclusions>
<exclusion>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
</exclusion>
</exclusions>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!--支持配置提示-->
<!-- configuration processor -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
Expand Down Expand Up @@ -187,12 +173,12 @@
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.30</version>
<version>5.8.41</version>
</dependency>
<dependency>
<groupId>com.xuxueli</groupId>
<artifactId>xxl-job-core</artifactId>
<version>2.4.2</version>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
Expand All @@ -213,6 +199,17 @@
<artifactId>bcprov-jdk18on</artifactId>
<version>1.78.1</version>
</dependency>
<!-- fesod -->
<dependency>
<groupId>cn.idev.excel</groupId>
<artifactId>fastexcel</artifactId>
<version>1.3.0</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.apache.fesod</groupId>-->
<!-- <artifactId>fesod</artifactId>-->
<!-- <version>1.3.0</version>-->
<!-- </dependency>-->
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.springframework.context.annotation.Configuration;

import jakarta.annotation.Resource;

import java.util.concurrent.TimeUnit;

/**
Expand Down Expand Up @@ -64,9 +65,9 @@ public CacheManager cacheManager(Caffeine<Object, Object> caffeine) {
return cacheManager;
}

@Bean(name = "cachePlus")
public CachePlus newCaffeineCachePlus(Cache<Object, Object> caffeineCache) {
return new CachePlus(caffeineCache);
@Bean(name = "cache")
public CacheImpl newCaffeineCache(Cache<Object, Object> caffeineCache) {
return new CacheImpl(caffeineCache);
}

}
6 changes: 3 additions & 3 deletions src/main/java/com/starfish/common/cache/CacheCondition.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ public class CacheCondition extends SpringBootCondition {
@Override
public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) {
Environment environment = context.getEnvironment();
Boolean cacheEnabled = environment.getProperty("application.cache.enabled", Boolean.class);
Boolean cacheEnabled = environment.getProperty("starfish.cache.enabled", Boolean.class);
if (cacheEnabled != null && cacheEnabled) {
return ConditionOutcome.match("application.cache.enabled=true");
return ConditionOutcome.match("starfish.cache.enabled=true");
} else {
return ConditionOutcome.noMatch("application.cache.enabled=false");
return ConditionOutcome.noMatch("starfish.cache.enabled=false");
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.starfish.common.cache;

/**
* CachePlus,使用caffeine做本地缓存
* Cache,使用caffeine做本地缓存
*
* @author sunkolin
* @version 1.0.0
* @since 2021-06-11
*/
public class CachePlus implements Cache {
public class CacheImpl implements Cache {

/**
* exist后缀
Expand All @@ -16,7 +16,7 @@ public class CachePlus implements Cache {

private final com.github.benmanes.caffeine.cache.Cache<Object, Object> caffeineCache;

public CachePlus(com.github.benmanes.caffeine.cache.Cache<Object, Object> caffeineCache) {
public CacheImpl(com.github.benmanes.caffeine.cache.Cache<Object, Object> caffeineCache) {
this.caffeineCache = caffeineCache;
}

Expand Down
111 changes: 0 additions & 111 deletions src/main/java/com/starfish/common/cache/EhcacheUtil.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package com.starfish.common.elastic;

/**
* ElasticSearchPlus
* ElasticSearch
*
* @author sunkolin
* @version 1.0.0
* @since 2022-08-02
*/
public class ElasticSearchPlus {
public class ElasticSearch {

/**
* constructor
*/
private ElasticSearchPlus() {
private ElasticSearch() {
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
@Slf4j
@Configuration
@AutoConfigureAfter(TaskExecutionAutoConfiguration.class)
@ConditionalOnProperty(prefix = "application.executor", name = "enabled", havingValue = "true")
@ConditionalOnProperty(prefix = "starfish.executor", name = "enabled", havingValue = "true")
@EnableConfigurationProperties({ExecutorProperties.class})
public class ExecutorAutoConfiguration {

Expand Down
Loading
Loading