gradle.bat 파일
- 원도우용 실행 배치 스크립트.
- 원도우에서 실행 가능하다는 점만 제외하면 gradlew와 동일.
gradle/wrapper/gradle-wrapper.jar 파일
- Wrapper 파일.
- gradlew나 gradlew.bat 파일이 프로젝트 내에 설치하는 이 파일을 사용하여 gradle task를 실행하기 때문에 로컬 환경의 영향을 받지 않음.(실제로는 Wrapper 버전에 맞는 구성들을 로컬 캐시에 다운로드 받음)
gradle/wrapper/gradle-wrapper.properties 파일
- Gradle Wrapper 설정 파일.
- 이 파일의 wrapper 버전 등을 변경하면 task 실행시, 자동으로 새로운 Wrapper 파일을 로컬 캐시에 다운로드 받음.
build.gradle 파일
- 의존성이나 플러그인 설정 등을 위한 스크립트 파일.
settings.gradle 파일
- 프로젝트의 구성 정보를 기록하는 파일.
- 어떤 하위프로젝트들이 어떤 관계로 구성되어 있는지를 기술.
- Gradle은 이 파일에 기술된대로 프로젝트를 구성함.
의존성 관리
- repositories를 사용해서 의존성을 가져올 주소를 설정.
- dependencies를 사용해서 설정된 Repository에서 가져올 아티팩트를 설정
Gradle 빌드시스템 기초
Gradle Gradle Wrapper를 사용하는 목적 이미 존재하는 프로젝트를 새로운 환경에 설치할때 별도의 설치나 설정과정없이 곧 바로 빌드할 수 있게 하기 위함(Java나 Gradle도 설치할 필요가 없음. 또한 로
effectivesquid.tistory.com
build.gradle 을 열어서 의존성 주입을 해줍니다.
그 다음
webapp -> WEB-INF -> view 폴더를 만들어준 후 .jsp 파일을 생성해줍니다.
view를 만든 후 DemoApplication 하위에 뷰를 반환해줄 컨트롤러 클래스를 생성해줍니다.
이제 서버를 실행해보면
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
Reason: Failed to determine a suitable driver class
콘솔에 이런 오류 메세지가 뜨면서 정상적으로 실행이 되지 않습니다.
application.properties 에 다음과 같이 JDBC url을 추가해주면 됩니다.
# DataSource
spring.datasource.url=jdbc:mysql://localhost:3306/[DB스키마명]?autoReconnect=true
spring.datasource.username=[DB접속Id]
spring.datasource.password=[DB접속Password]
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
출처: https://fntg.tistory.com/193
Spring Boot 최초 실행 시 'Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource cou
Spring Boot 초기 프로젝트를 Initializr를 통해서 생성 한 뒤 최초 실행 할 경우 다음과 같은 오류가 발생하면서 정상적으로 실행이 되지 않을 경우. *************************** APPLICATION FAILED TO STAR..
fntg.tistory.com
*** 결과 확인하기 ***
'spring' 카테고리의 다른 글
[Spring] JSP 한글이 깨져요 한글 깨짐 현상 인코딩 바꾸는 법 (0) | 2023.04.21 |
---|---|
[GRADLE] 스프링부트 gradle jsp 수정 후 새로고침 바로 반영하는 방법 (0) | 2022.03.13 |
[GRADLE] 스프링부트 gradle "com.mysql.jdbc.Driver" 오류 (0) | 2021.10.24 |
[HTML/CSS] Drop down Navigation bar (드롭다운 네비게이션 바) (0) | 2021.10.17 |
Spring MVC모델 자주 묻는 질문 게시판 (1) | 2021.07.30 |