我正在尝试使用后端存储库(文件系统)设置 Spring Cloud Config Server,但端点(http://localhost:8888/licensingservice/default
)返回以下内容:
{"name":"licensingservice","profiles":["default"],"label":null,"version":null,"state":null,"propertySources":[]}
Run Code Online (Sandbox Code Playgroud)
主要的:
@EnableConfigServer
@SpringBootApplication
public class ConfigServerApplication {
public static void main(String[] args) {
SpringApplication.run(ConfigServerApplication.class, args);
}
}
Run Code Online (Sandbox Code Playgroud)
应用程序.yml:
server:
port: 8888
spring:
profiles:
active: native
cloud:
config:
server:
native:
searchLocations: file:///Users/josedavi/Desenvolvimento/WorkSpace/Pessoal/sample-spring-microservices/sample-spring-microservices/config-server/src/main/resources/config
Run Code Online (Sandbox Code Playgroud)
许可服务.yml:
tracer.property: "I AM THE DEFAULT"
spring.jpa.database: "POSTGRESQL"
spring.datasource.platform: "postgres"
spring.jpa.show-sql: "true"
spring.database.driverClassName: "org.postgresql.Driver"
spring.datasource.url: "jdbc:postgresql://database:5432/eagle_eye_local"
spring.datasource.username: "postgres"
spring.datasource.password: "p0stgr@s"
spring.datasource.testWhileIdle: "true"
spring.datasource.validationQuery: "SELECT 1"
spring.jpa.properties.hibernate.dialect: "org.hibernate.dialect.PostgreSQLDialect"
Run Code Online (Sandbox Code Playgroud)
服务配置的路径:
C:\Users\josedavi\Desenvolvimento\WorkSpace\Pessoal\sample-spring-microservices\sample-spring-microservices\config-server\src\main\resources\config
Run Code Online (Sandbox Code Playgroud)
项目: https: //github.com/jdavid-araujo/sample-spring-microservices