Skip to content

Commit

Permalink
feat: config 파일 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
minsu11 committed Feb 18, 2024
1 parent 56b8d79 commit 58fa8db
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/java/store/mybooks/front/FrontApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;

@ConfigurationPropertiesScan
@SpringBootApplication
public class FrontApplication {

public static void main(String[] args) {
SpringApplication.run(FrontApplication.class, args);
}
public static void main(String[] args) {
SpringApplication.run(FrontApplication.class, args);
}

}
29 changes: 29 additions & 0 deletions src/main/java/store/mybooks/front/config/WebClientConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package store.mybooks.front.config;

import java.time.Duration;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
* packageName : store.mybooks.front.config
* fileName : WebClientConfig
* author : minsu11
* date : 2/19/24
* description :
* ===========================================================
* DATE AUTHOR NOTE
* -----------------------------------------------------------
* 2/19/24 minsu11 최초 생성
*/
@Configuration
public class WebClientConfig {
@Bean
public RestTemplate restTemplate(RestTemplateBuilder builder) {
return builder
.setConnectTimeout(Duration.ofSeconds(3L))
.setReadTimeout(Duration.ofSeconds(3L))
.build();
}
}

0 comments on commit 58fa8db

Please sign in to comment.