Spring

Spring Added dependencies 등 간편하게 사용

code2772 2022. 12. 8. 12:50
728x90
반응형

✔ Maven repository 통하지 않고 인텔리제이에서 바로 Added dependencies 하는 법 

file -> New Project -> Added dependencies 를 원하는 부분을 Dependencies에서 찾아 삽입해주면 된다.

 

✔ 결과 -> build.gradle을 보면 바로 들어간것을 볼 수 있다. 

버전은 따로 없고 Spring에 맞는 적절한 내용이 들어간것을 볼 수 있다. 

repositories {
   mavenCentral()
}
//버전은 따로 없고 spring에 맞는 내용이 자동으로 들어간다.
dependencies {
   implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
   implementation 'org.springframework.boot:spring-boot-starter-web'
   compileOnly 'org.projectlombok:lombok'
   runtimeOnly 'com.mysql:mysql-connector-j'
   annotationProcessor 'org.projectlombok:lombok'
   testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

tasks.named('test') {
   useJUnitPlatform()
}

 

✔  유료버전에

application.properties(기존)  -> application.yml(새로운) 로 변경한다.

 

spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://127.0.0.1:3306/aidev?useUnicode=true&serverTimezone=Asia/Seoul
    username: root
    password: 1234
  jpa:
    show-sql: true
    properties:
      hibernate:
        format_sql: true

server:
  port: 8888


 

반응형