1
votes

I am new to spring cloud my objective was to connect local git repo (windows machine --> created at folder Z:/Spring_boot_cloud_microservices_udemy/Projects/local-git-repo/) to spring cloud server.But when i enter its corresponding url (http://localhost:8888/limit-services/default) I am getting default whitelabel error page of eclipse,Can anyone kindly let me identify my mistake .

Following are the projects created :

where limit-service is one of the micro service

enter image description here

Following are its corresponding code:

1] application.properties (limit-service -- > Micro service)

spring.application.name=limit-services
server.port=8081
# custom limits to access for config properties
limit-service.minlimit=121  
# custom limits to access for config properties
limit-service.maxlimit=1  

2] application.properties (spring-cloud-config-server)

spring.application.name=spring-cloud-config-server
server.port=8888
spring.cloud.config.server.git.uri=file://Z:/Spring_boot_cloud_microservices_udemy/Projects/local-git-repo/

3] Spring boot Main class (spring-cloud-server):

@EnableConfigServername
@SpringBootApplication
public class SpringConfigCloudServerApplication {
public static void main(String[] args) {
        System.setProperty("spring.devtools.restart.enabled", "false");
        SpringApplication.run(SpringConfigCloudServerApplication.class, args);
    }

}

4] Local git repo linked to Spring-cloud-server:

enter image description here

5] logs captured on hitting following url is: http://localhost:8888/limit-services/default

2020-05-15 07:22:03.943  INFO 30412 --- [           main] c.s.s.SpringConfigCloudServerApplication : Started SpringConfigCloudServerApplication in 13.168 seconds (JVM running for 14.341)
2020-05-15 07:22:11.689  INFO 30412 --- [nio-8888-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2020-05-15 07:22:11.690  INFO 30412 --- [nio-8888-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2020-05-15 07:22:11.700  INFO 30412 --- [nio-8888-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 10 ms
2020-05-15 07:22:11.953  INFO 30412 --- [nio-8888-exec-1] .c.s.e.MultipleJGitEnvironmentRepository : Cannot pull from remote null, the working tree is not clean.
1

1 Answers

0
votes

After refering following link: https://github.com/in28minutes/in28minutes-initiatives/tree/master/The-in28Minutes-TroubleshootingGuide-And-FAQ#debugging-problems-with-spring-cloud-config-server i was able to identify my mistake, the mistake was i did not commit application.properties file to my local repo hence i was getting following log info message : Cannot pull from remote null, the working tree is not clean. after commiting file i was able to get desired result.