mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-09-08 16:57:09 +08:00
refactor(core): ProjectProperties => ApplicationProperties
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.continew.starter.core.autoconfigure.project;
|
||||
package top.continew.starter.core.autoconfigure.application;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
@@ -22,7 +22,7 @@ import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
/**
|
||||
* 项目自动配置
|
||||
* 应用自动配置
|
||||
*
|
||||
* @author Charles7c
|
||||
* @since 1.0.0
|
||||
@@ -30,5 +30,5 @@ import org.springframework.context.annotation.Import;
|
||||
@AutoConfiguration
|
||||
@ComponentScan("cn.hutool.extra.spring")
|
||||
@Import(cn.hutool.extra.spring.SpringUtil.class)
|
||||
@EnableConfigurationProperties(ProjectProperties.class)
|
||||
public class ProjectAutoConfiguration {}
|
||||
@EnableConfigurationProperties(ApplicationProperties.class)
|
||||
public class ApplicationAutoConfiguration {}
|
@@ -14,18 +14,23 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.continew.starter.core.autoconfigure.project;
|
||||
package top.continew.starter.core.autoconfigure.application;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
/**
|
||||
* 项目配置属性
|
||||
* 应用配置属性
|
||||
*
|
||||
* @author Charles7c
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@ConfigurationProperties("project")
|
||||
public class ProjectProperties {
|
||||
@ConfigurationProperties("application")
|
||||
public class ApplicationProperties {
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
@@ -33,20 +38,15 @@ public class ProjectProperties {
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 应用名称
|
||||
* 描述
|
||||
*/
|
||||
private String appName;
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 版本
|
||||
*/
|
||||
private String version;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* URL
|
||||
*/
|
||||
@@ -147,6 +147,14 @@ public class ProjectProperties {
|
||||
}
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
@@ -155,12 +163,12 @@ public class ProjectProperties {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getAppName() {
|
||||
return appName;
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setAppName(String appName) {
|
||||
this.appName = appName;
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
@@ -171,14 +179,6 @@ public class ProjectProperties {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
@@ -1,3 +1,3 @@
|
||||
top.continew.starter.core.autoconfigure.project.ProjectAutoConfiguration
|
||||
top.continew.starter.core.autoconfigure.application.ApplicationAutoConfiguration
|
||||
top.continew.starter.core.autoconfigure.threadpool.ThreadPoolAutoConfiguration
|
||||
top.continew.starter.core.autoconfigure.threadpool.AsyncAutoConfiguration
|
Reference in New Issue
Block a user