Skip to content

Commit

Permalink
Merge pull request #31 from oven-2023/recommendation
Browse files Browse the repository at this point in the history
change HomeController
  • Loading branch information
see101702 authored Oct 20, 2023
2 parents 294bf42 + 3b30855 commit 0613797
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/main/java/com/oven/server/ServerApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication(exclude={SecurityAutoConfiguration.class})
@ComponentScan("com.oven.server")
@EnableFeignClients
public class ServerApplication {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,12 @@

@Tag(name="Home", description = "홈 화면 API")
@RestController
@RequiredArgsConstructor
//@RequiredArgsConstructor
@RequestMapping("/home")
public class HomeController {

@Autowired
private final GetPopularWorkListService getPopularWorkListService;
@Autowired
private final GetRecommendWorksService getRecommendWorkListService;
@Autowired
private final FlaskFeignClient flaskFeignClient;

@Operation(summary = "인기 작품 조회 API")
Expand All @@ -52,6 +49,12 @@ public Response<List<WorkListDto>> getRecommendWorkList(@AuthenticationPrincipal
}
}

@Autowired
public HomeController(GetPopularWorkListService getPopularWorkListService, GetRecommendWorksService getRecommendWorkListService, FlaskFeignClient flaskFeignClient) {
this.getPopularWorkListService = getPopularWorkListService;
this.getRecommendWorkListService = getRecommendWorkListService;
this.flaskFeignClient = flaskFeignClient;
}

// /home/recommendation/provider

Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/oven/server/feign/FlaskFeignClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@Component
@FeignClient(name = "flask", url = "http://flask:6000")
public interface FlaskFeignClient {
@RequestMapping(method = RequestMethod.GET, value = "/spring")
Expand Down

0 comments on commit 0613797

Please sign in to comment.