Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- Unsatisfied dependency
- jwt메서드
- queryDSL
- 최종 프로젝트
- REST란
- Spring Spring boot 차이
- JoinColumn
- 스프링부트오류
- jpa회원가입
- @IdClass
- json
- 1차캐시
- uncheck Exception
- git
- 스프링 부트 기능
- JPA주의사항
- Filter
- 빈생성안됨
- Q 클래스
- spring서버
- github
- JPA
- Error creating bean with name
- 복합키
- 스프링 부트 공식 문서
- REST API 규칙
- 인텔리제이
- json gson 차이
- ERD 작성
- jpa에러
Archives
- Today
- Total
Everyday Dev System
My Select Shop 프로젝트 초기 설정 본문
초기 프로젝트 설정
더보기
![](https://blog.kakaocdn.net/dn/dIsRjk/btskZVLoWap/WkOpWCk79dUT9toF6fTUL1/img.png)
![](https://blog.kakaocdn.net/dn/cllx2m/btskXMWhNn5/id4HWvBef9QyPcJwwEE9JK/img.png)
0. 프로젝트 생성
![](https://blog.kakaocdn.net/dn/dIsRjk/btskZVLoWap/WkOpWCk79dUT9toF6fTUL1/img.png)
1. build.gradle에서 security 의존성 주석처리.
plugins {
id 'java'
id 'org.springframework.boot' version '3.1.0'
id 'io.spring.dependency-management' version '1.1.0'
}
group = 'com.sparta'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '17'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
// JWT
compileOnly group: 'io.jsonwebtoken', name: 'jjwt-api', version: '0.11.5'
runtimeOnly group: 'io.jsonwebtoken', name: 'jjwt-impl', version: '0.11.5'
runtimeOnly group: 'io.jsonwebtoken', name: 'jjwt-jackson', version: '0.11.5'
// json
implementation 'org.json:json:20230227'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
//implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.mysql:mysql-connector-j'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
}
tasks.named('test') {
useJUnitPlatform()
}
2. application.properties에 DB 설정 정보 저장.
server.port=8081
spring.datasource.url=jdbc:mysql://localhost:3307/shop
spring.datasource.username=root
spring.datasource.password=1234
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.show_sql=true
spring.jpa.properties.hibernate.format_sql=true
spring.jpa.properties.hibernate.use_sql_comments=true
jwt.secret.key=7Iqk7YyM66W07YOA7L2U65Sp7YG065+9U3ByaW5n6rCV7J2Y7Yqc7YSw7LWc7JuQ67mI7J6F64uI64ukLg==
3. Mysql에서 DB shop 추가
![](https://blog.kakaocdn.net/dn/cllx2m/btskXMWhNn5/id4HWvBef9QyPcJwwEE9JK/img.png)
'내배캠 주요 학습 > Spring 숙련' 카테고리의 다른 글
MySelectShop - Version.1.1 - 페이징 및 정렬 기능 (0) | 2023.06.23 |
---|---|
MySelectShop - Version 1.0 (0) | 2023.06.23 |
N : M 양방향 관계에서 중간 테이블 직접 생성 (1) | 2023.06.21 |
@ManyToMany 양방향 관계 이해하기 (0) | 2023.06.21 |
@ManyToMany 단방향 관계 이해하기 (0) | 2023.06.21 |