본문 바로가기

Back-End

(60)
[JAVA][Spring] 본인 인증, 비밀번호 변경하기(2) 로그인, 회원가입 기능을 만들고 난 후 로그인할 때 비밀번호가 기억이 나지 않을 때 본인인증을 통한 비밀번호 변경 기능 추가하기 1. 회원가입 기능 ------>앞의 글 참고 2. 로그인 기능 ------>앞의 글 참고 3. 본인 인증 기능 4. 비밀번호 변경 기능 1)UserController.java 에 추가 @Controller public class UserController { @Autowired UserRepository userRepository; @Autowired PasswordEncoder passwordEncoder; @Autowired HttpSession session; // 본인 인증하기 @PostMapping("/validateUser") public ResponseEntity..
[JAVA][Spring] 로그인, 회원 가입 (1) 로그인, 회원가입 기능을 만들고 난 후 로그인할 때 비밀번호가 기억이 나지 않을 때 본인인증을 통한 비밀번호 변경 기능 추가하기 1. 회원가입 기능 + id 중복체크 기능 + 비밀번호 입력 시 눈모양 클릭하면 입력 내용 보이기 기능 2. 로그인 기능 + 비밀번호 입력 시 눈모양 클릭하면 입력 내용 보이기 기능 3. 본인 인증 기능 4. 비밀번호 변경 기능 [로그인] , [회원가입] 1. User.java (Entity만들기) @Entity @Data public class User implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String email; private S..
[프로그래머스 JAVA]문자열에서 대소문자 바꿔서 출력하기 문제 import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.next(); //aBcDeFg } } 정답 import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.next(); String result = ""; for(int i = 0; i < a.length() ; i++){ char c = a.charAt(i)..
[Java] 출력 방법 알아보기 1. System.out.print(); : 한 줄로 출력 2. System.out.println(); : 줄 바꿈 3. System.out.printf(); : 서식(% d, % s, % f, % c, ) System.out.printf ("출력 서식", 출력할 내용); %d 정수형 %s 문자열 %f 실수형 %c 문자형 %n 줄 바꿈 %b boolean Eclipse로 연습하기 자동완성 : syso 입력 후 ( ctrl + space )