728x90
개발자 유미 | 커뮤니티
www.devyummi.com
데이터베이스의 필요성
로그인한 사용자의 인증을 위해서는 회원 정보를 저장해야한다.
이를 위해서는 DB가 필요하며 JPA를 사용해 DB 쿼리문을 쉽게 생성할 수 있다.
build.gradle 설정
프로젝트에 MySQL 및 JAP 의존성을 추가 후 리프레쉬 후 필요한 파일을 다운받고 활성화를 해주자.
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
runtimeOnly 'com.mysql:mysql-connector-j'
}
application.properties 설정
스프링 서버에서 DB에 접속할 수 있도록 정보를 입력해주자.
spring.application.name=testsecurity
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/
spring.datasource.username=root
spring.datasource.password=admin
728x90
'Spring > Spring Security' 카테고리의 다른 글
개발자 유미 - 스프링 시큐리티 5. BCrypt 암호화 메소드 (0) | 2025.03.07 |
---|---|
개발자 유미 - 스프링 시큐리티 4. 커스텀 로그인 설정 (0) | 2025.03.07 |
개발자 유미 - 스프링 시큐리티 3. Security Config 인가 작업 (0) | 2025.02.09 |
개발자 유미 - 스프링 시큐리티 2. 프로젝트 생성 (0) | 2025.02.09 |
개발자 유미 - 스프링 시큐리티 1 : 실습 목표 및 간단한 동작 원리 (0) | 2025.02.05 |