본문 바로가기

전체 글

(133)
JSON 데이터 보기 쉽게 해주는 크롬 앱 https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc?hl=ko JSONVue Validate and view JSON documents chrome.google.com
CSS 기본 //구글폰트시작 //구글폰트 전체적용 * { font-family: 'Gowun Dodum', sans-serif; } //부트스트랩, 제이쿼리시작 //백그라운드 이미지 { background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("https://movie-phinf.pstatic.net/20210715_95/1626338192428gTnJl_JPEG/movie_image.jpg"); background-position: center; background-size: cover; } //요소를 정 중앙에 { display: flex; flex-direction: column; justify-content: cen..
타임리프 onclick에 th요소 넣기
mysql 한글 깨짐, my.ini 파일 위치 1. my.ini 열기 (기본 파일 위치는 아래와 같습니다) C:\ProgramData\MySQL\MySQL Server 5.7/my.ini 2. [mysql]절, [mysqld]절 변경 - Ctrl+f 를 이용해 [mysql], [mysqld]를 찾은후 아래와 같이 수정해주세요 [mysql] default-character-set=utf8 [mysqld] collation-server = utf8_unicode_ci character-set-server = utf8 skip-character-set-client-handshake 3. 서비스 - mysql 다시시작 4. 문제해결 확인
[git] failed to push some refs to 해결 방법 1. git pull 2. 경고창 뜸 Merge branch 'main' of {당신의 repository 주소} # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit. 3. i누름 - esc누름 - shift+ ;(세미콜론) 누름 -enter 누름 4.git push
카카오 로그인 구현(4) - 유저정보 알아내기 1. return값을 담을 domain 생성 @Getter @Setter @ToString public class KakaoResult { Long id; String email; String nickname; } 2. 유저정보 요청하기 //인증코드로 token요청하기 public User requestUser(String accessToken){ log.info("requestUser 시작"); String strUrl = "https://kapi.kakao.com/v2/user/me"; //request를 보낼 주소 User user = new User(); //response를 받을 객체 try{ URL url = new URL(strUrl); HttpURLConnection conn = (Http..
카카오 로그인 구현(4) - 카카오 토큰 받기 1. 토큰 받을 준비하기 response type에 맞는 domain(KakaoToken.java) 생성 @Getter @Setter @ToString public class KakaoToken { String token_type; String access_token; Integer expires_in; String refresh_token; Integer refresh_token_expires_in; String scope; } 2. 토큰 요청하기 LoginService.java 작성 requestToken 메소드는 인증코드를 인자로 받아 KakaoToken의 객체를 이용해 token을 리턴합니다. @Slf4j @Component public class LoginService { private fina..
카카오 로그인 구현(3) - 인증코드받기 1. 응답받을 View 페이지 redirectPage.html 작성 #redirectPage.html 2. Controller에 응답받을 View 페이지 mapping 등록 @Controller public class LoginController { private final LoginService loginService; public LoginController(LoginService loginService) { this.loginService = loginService; } //redirect 경로 mapping @RequestMapping("/login/kakao-redirect") public String kakaoLogin(@RequestParam(value = "code",required = f..