Skip to content

Commit

Permalink
[BAEL-10982] - Fixed application startup
Browse files Browse the repository at this point in the history
  • Loading branch information
amit2103 committed Mar 16, 2019
1 parent 6ad4766 commit 70736ee
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 18 deletions.
4 changes: 4 additions & 0 deletions spring-resttemplate/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.baeldung.resttemplate.configuration;
package org.baeldung.resttemplate;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;
import org.springframework.web.client.RestTemplate;

@Configuration
@EnableAutoConfiguration
Expand All @@ -25,4 +26,8 @@ public RestTemplateBuilder restTemplateBuilder() {
return new RestTemplateBuilder(customRestTemplateCustomizer());
}

@Bean
public RestTemplate restTemplate() {
return new RestTemplate();
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.baeldung.web.dto;
package org.baeldung.resttemplate.web.dto;

import com.thoughtworks.xstream.annotations.XStreamAlias;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.baeldung.web.exception;
package org.baeldung.resttemplate.web.exception;

public class NotFoundException extends RuntimeException {
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.baeldung.web.handler;
package org.baeldung.resttemplate.web.handler;

import org.baeldung.web.exception.NotFoundException;
import org.baeldung.resttemplate.web.exception.NotFoundException;
import org.springframework.http.HttpStatus;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.stereotype.Component;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.baeldung.web.model;
package org.baeldung.resttemplate.web.model;

public class Bar {
private String id;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.baeldung.web.model;
package org.baeldung.resttemplate.web.model;

import java.util.Date;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.baeldung.web.service;
package org.baeldung.resttemplate.web.service;

import org.baeldung.web.handler.RestTemplateResponseErrorHandler;
import org.baeldung.web.model.Bar;
import org.baeldung.resttemplate.web.handler.RestTemplateResponseErrorHandler;
import org.baeldung.resttemplate.web.model.Bar;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.stereotype.Service;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.baeldung.web.service;
package org.baeldung.resttemplate.web.service;

import org.baeldung.web.model.Employee;
import org.baeldung.resttemplate.web.model.Employee;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.baeldung;

import org.baeldung.resttemplate.configuration.RestTemplateConfigurationApplication;
import org.baeldung.resttemplate.RestTemplateConfigurationApplication;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import java.util.Arrays;
import java.util.Set;

import org.baeldung.web.dto.Foo;
import org.baeldung.resttemplate.web.dto.Foo;
import org.junit.Before;
import org.junit.Test;
import org.springframework.http.HttpEntity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package org.baeldung.web.handler;

import org.baeldung.web.exception.NotFoundException;
import org.baeldung.web.model.Bar;
import org.baeldung.resttemplate.web.exception.NotFoundException;
import org.baeldung.resttemplate.web.handler.RestTemplateResponseErrorHandler;
import org.baeldung.resttemplate.web.model.Bar;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
import java.net.URI;

import org.baeldung.SpringTestConfig;
import org.baeldung.web.model.Employee;
import org.baeldung.resttemplate.web.model.Employee;
import org.baeldung.resttemplate.web.service.EmployeeService;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.baeldung.web.service;

import org.baeldung.web.model.Employee;
import org.baeldung.resttemplate.web.model.Employee;
import org.baeldung.resttemplate.web.service.EmployeeService;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
Expand Down

0 comments on commit 70736ee

Please sign in to comment.