我有一个 spring-boot
使用的项目 spring-cloud
集中管理物业。
我已经配置了应用程序如下
@SpringBootApplication
@EnableConfigServer
public class ConfigServerApplication {
public static void main( String[] args )
{
SpringApplication.run(ConfigServerApplication.class, args);
}
}
以及 application.properties
如下所示
spring.application.name=spring-cloud-config-server
server.port=8888
spring.cloud.config.server.git.uri=file:///ebs/payment-config-server-git
但当我运行jar时,应用程序日志会在,
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.3.0.RELEASE)
2020-06-08 19:36:38.641 INFO 4278 --- [ main] c.h.t.c.ConfigServerApplication : No active profile set, falling back to default profiles: default
2020-06-08 19:36:40.303 INFO 4278 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=cb4015b1-4a5b-3c4c-a050-3196b94db932
2020-06-08 19:36:40.973 INFO 4278 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8888 (http)
2020-06-08 19:36:41.001 INFO 4278 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-06-08 19:36:41.002 INFO 4278 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.35]
2020-06-08 19:36:41.128 INFO 4278 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-06-08 19:36:41.128 INFO 4278 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 2460 ms
2020-06-08 19:36:41.608 INFO 4278 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2020-06-08 19:36:42.649 INFO 4278 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 2 endpoint(s) beneath base path '/actuator'
2020-06-08 19:36:42.718 INFO 4278 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8888 (http) with context path ''
2020-06-08 19:36:42.738 INFO 4278 --- [ main] c.h.t.c.ConfigServerApplication : Started ConfigServerApplication in 5.573 seconds (JVM running for 6.371)
它应该记录从中读取属性的存储库位置。但它没有打印这些日志,我也无法从应用程序中读取任何属性。
我的配置文件有什么错误?
谢谢您。
ps:未设置git原点。git存储库没有远程服务器
暂无答案!
目前还没有任何答案,快来回答吧!