-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from opensabre/0.0.9
0.0.9
- Loading branch information
Showing
43 changed files
with
469 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...starter-boot/src/main/java/io/github/opensabre/boot/config/YamlPropertyLoaderFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package io.github.opensabre.boot.config; | ||
|
||
import lombok.NonNull; | ||
import org.springframework.boot.env.YamlPropertySourceLoader; | ||
import org.springframework.core.env.PropertySource; | ||
import org.springframework.core.io.support.DefaultPropertySourceFactory; | ||
import org.springframework.core.io.support.EncodedResource; | ||
|
||
import java.io.IOException; | ||
|
||
/** | ||
* 加载yaml的Factory | ||
*/ | ||
public class YamlPropertyLoaderFactory extends DefaultPropertySourceFactory { | ||
|
||
@Override | ||
public @NonNull PropertySource<?> createPropertySource(String name, EncodedResource resource) throws IOException { | ||
return new YamlPropertySourceLoader().load(resource.getResource().getFilename(), resource.getResource()).get(0); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
opensabre-starter-boot/src/main/java/io/github/opensabre/boot/entity/SwaggerInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package io.github.opensabre.boot.entity; | ||
|
||
import lombok.Data; | ||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
|
||
@Data | ||
@ConfigurationProperties(prefix = "opensabre.rest.swagger") | ||
public class SwaggerInfo { | ||
private String version; | ||
private String title; | ||
private String description; | ||
private String licenseUrl; | ||
private String licenseName; | ||
private String wikiUrl; | ||
private String wikiDocumentation; | ||
} |
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
opensabre-starter-boot/src/main/resources/bootstrap.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#==============日志===============# | ||
logging.level.io.github.opensabre=info | ||
logging.logback.rollingpolicy.max-file-size=1GB | ||
logging.file.path=logs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
opensabre-starter-boot/src/main/resources/opensabre-boot.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#==============springboot相关配置===============# | ||
spring.sleuth.sampler.probability=1 | ||
spring.mvc.format.date-time=yyyy-MM-dd HH:mm:ss | ||
spring.mvc.format.date=yyyy-MM-dd | ||
spring.servlet.multipart.max-request-size=2MB | ||
spring.servlet.multipart.max-file-size=5MB | ||
spring.jackson.time-zone=GMT+8 | ||
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss | ||
spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:8000 | ||
spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://localhost:8000/oauth2/jwks | ||
#==============server相关配置===============# | ||
server.shutdown=graceful | ||
#==============敏感信息加密配置===============# | ||
jasypt.encryptor.password=${JASYPT_ENCRYPTOR_PASSWORD:Pa55w0rd@opensabre} | ||
#==============管理端点===============# | ||
#启用配置里的info开头的变量 | ||
management.info.env.enabled=true | ||
info.name=${spring.application.name} | ||
info.version=${application.formatted-version} | ||
info.java.version=${java.version} | ||
info.opensabre.version=${opensabre.version} | ||
info.opensabre.cloud.az=${opensabre.cloud.az} | ||
info.opensabre.cloud.region=${opensabre.cloud.region} | ||
#==============脱敏===============# | ||
opensabre.sensitive.log.enabled=false | ||
opensabre.sensitive.log.rules=mobile,idCard,phone | ||
#==============Rest报文===============# | ||
# 统一报文排除的包名,该包下的rest不使用统一报文,框架内置 | ||
opensabre.rest.result.framework.excludes=org.springdoc | ||
# 统一报文排除的包名,该包下的rest不使用统一报文,应用级配置 | ||
opensabre.rest.result.excludes= | ||
#==============Rest Swagger文档===============# | ||
opensabre.rest.swagger.version=v0.0.1 | ||
opensabre.rest.swagger.title=Opensabre API | ||
opensabre.rest.swagger.description=Opensabre REST API | ||
opensabre.rest.swagger.licenseUrl=https://github.com/opensabre/opensabre-framework | ||
opensabre.rest.swagger.licenseName=Apache 2.0 | ||
opensabre.rest.swagger.wikiUrl=https://opensabre.github.io/docs | ||
opensabre.rest.swagger.wikiDocumentation=Opensabre Wiki Documentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
opensabre-starter-cache/src/main/java/io/github/opensabre/cache/redis/DefaultCacheArea.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package io.github.opensabre.cache.redis; | ||
|
||
/** | ||
* 默认缓存区域 | ||
* longTime 长时间缓存 | ||
* shortTime 短时缓存 | ||
*/ | ||
public interface DefaultCacheArea { | ||
String LONG_TIME_AREA = "longTime"; | ||
String SHORT_TIME_AREA = "shortTime"; | ||
} |
13 changes: 13 additions & 0 deletions
13
opensabre-starter-cache/src/main/java/io/github/opensabre/cache/redis/JetCacheConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package io.github.opensabre.cache.redis; | ||
|
||
import com.alicp.jetcache.autoconfigure.JetCacheAutoConfiguration; | ||
import org.springframework.boot.autoconfigure.AutoConfiguration; | ||
import org.springframework.context.annotation.PropertySource; | ||
|
||
/** | ||
* 打开Redis缓存配置类 | ||
*/ | ||
@AutoConfiguration(before = JetCacheAutoConfiguration.class) | ||
@PropertySource(value = "classpath:opensabre-cache.properties", encoding = "UTF8") | ||
public class JetCacheConfig { | ||
} |
13 changes: 0 additions & 13 deletions
13
opensabre-starter-cache/src/main/java/io/github/opensabre/cache/redis/RedisConfig.java
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...esources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
io.github.opensabre.cache.redis.RedisConfig | ||
io.github.opensabre.cache.redis.JetCacheConfig |
64 changes: 0 additions & 64 deletions
64
opensabre-starter-cache/src/main/resources/application.yml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.