From ef8ac9dcba1beb894ad1c06bbf6c401954e9520b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9E=A5=EC=98=81=EC=9E=AC?= Date: Wed, 6 Nov 2024 16:24:27 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=B9=88=20=EB=93=B1=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/org/yj/sejongauth/config/AutoConfig.java | 10 +++++++++- .../java/org/yj/sejongauth/domain/AuthService.java | 2 ++ .../java/org/yj/sejongauth/domain/ProfileService.java | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/yj/sejongauth/config/AutoConfig.java b/src/main/java/org/yj/sejongauth/config/AutoConfig.java index a590227..aa09c10 100644 --- a/src/main/java/org/yj/sejongauth/config/AutoConfig.java +++ b/src/main/java/org/yj/sejongauth/config/AutoConfig.java @@ -1,9 +1,17 @@ package org.yj.sejongauth.config; +import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; +import org.yj.sejongauth.controller.Sj; +import org.yj.sejongauth.domain.AuthService; +import org.yj.sejongauth.domain.ProfileService; @Configuration @ComponentScan("org.yj.sejongauth") public class AutoConfig { -} + @Bean + public Sj sj(AuthService authService, ProfileService profileService) { + return new Sj(authService, profileService); + } +} \ No newline at end of file diff --git a/src/main/java/org/yj/sejongauth/domain/AuthService.java b/src/main/java/org/yj/sejongauth/domain/AuthService.java index 66db927..d96ebd3 100644 --- a/src/main/java/org/yj/sejongauth/domain/AuthService.java +++ b/src/main/java/org/yj/sejongauth/domain/AuthService.java @@ -9,7 +9,9 @@ import java.net.URISyntaxException; import java.util.List; import java.util.Map; +import org.springframework.stereotype.Service; +@Service public class AuthService { private String jsessionId; private final String SJ_LOGIN_URL = "https://classic.sejong.ac.kr/userLogin.do"; diff --git a/src/main/java/org/yj/sejongauth/domain/ProfileService.java b/src/main/java/org/yj/sejongauth/domain/ProfileService.java index b832ba2..8df35c9 100644 --- a/src/main/java/org/yj/sejongauth/domain/ProfileService.java +++ b/src/main/java/org/yj/sejongauth/domain/ProfileService.java @@ -7,7 +7,9 @@ import java.net.URL; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; +import org.springframework.stereotype.Service; +@Service public class ProfileService { private final String PROFILE_URL = "http://classic.sejong.ac.kr/userCertStatus.do?menuInfoId=MAIN_02_05"; private final String FAIDED_PROFILE = "정보 조회에 실패하였습니다.";