HANDA개발
HANDA개발공부
HANDA개발
전체 방문자
오늘
어제
  • HANDA_list
    • 취업일지
    • 일상
    • TIL
    • Linux
    • RabbitMQ
    • Spring
      • Security
      • Batch
      • Project
    • ERROR
    • DB
      • Oracle
      • PostgreSQL
    • JUnit
    • JAVA
    • AWS
    • OAuth2.0
    • Redis
    • API
    • Jenkins
    • Nigix
    • CS
    • 코테준비
      • 자료구조
      • 알고리즘
    • 학교수업
    • 디자인패턴

블로그 메뉴

  • 홈
  • 태그
  • 방명록

공지사항

인기 글

태그

  • Parameter
  • Spring
  • 공부준비
  • 재실행
  • MQ
  • valid어노테이션
  • oracle
  • Job
  • 어노테이션
  • garbaage
  • 데이터베이스
  • 명령어
  • gson
  • @Valid
  • 프로시져호출
  • error
  • 다른파라미터
  • SpringBatch
  • mybatis
  • JVM
  • java실행과정
  • EAI
  • cmd
  • 역직렬화
  • JAVA명령어
  • batch
  • 상태관리
  • 프로그래머스
  • 애플코딩
  • 스프링배치

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
HANDA개발
Spring/Batch

[Spring Boot Batch] 오류: "Failed to configure a DataSource: ‘url’ attribute is not...". 오류해결

[Spring Boot Batch] 오류: "Failed to configure a DataSource: ‘url’ attribute is not...". 오류해결
Spring/Batch

[Spring Boot Batch] 오류: "Failed to configure a DataSource: ‘url’ attribute is not...". 오류해결

2022. 9. 13. 16:13
spring:
  config:
    activate:
      on-profile: mysql
  datasource:
    hikari:
      driver-class-name: com.mysql.jdbc.Driver
      jdbc-url: jdbc:mysql://localhost:3306/springBatch?useUnicode=true&character_set_server=utf8;
      username: kimhee
      password: sn8657sn
  batch:
    jdbc:
      initialize-schema: always

내 경우에 application.yml에 db관련 설정 후, 실행 시 url 설정이 잘못되었다는 오류가 자꾸났다.

퍼온 이미지이지만 똑같은 오류였음.

application.yml 파일에 아래와 같이 jdbc driver 관련 설정 추가하는게 해결방법이라고 나오는데

이미 설정을 했음에도 같은 오류가 났다.

 

그래서 className과  pom.xml에 db 관련 의존성들을 다시 체크해주었다.

className 체크

 

        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.27</version>
            <scope>runtime</scope>
        </dependency>

mysql 버전은 utf8오류가 나지 않도록 8.0.27 버전을, 그리고 h2의존성도 다시한번 넣어 maven을 리로딩해주었다.

해결된 후 잘 돌아감. 테이블들도 잘 생성됨.

 

 

 

https://stackoverflow.com/questions/46140583/caused-by-java-sql-sqlexception-unsupported-character-encoding-utf8mb4

 

Caused by: java.sql.SQLException: Unsupported character encoding 'utf8mb4'

I am writing an app that is going to heavily use utf-8 encoding. For the server I'm using java servlets, and for the UI I'm using Java Servlets with jsp and javascript. So, after ignoring the gibbe...

stackoverflow.com

https://www.yawintutor.com/failed-to-configure-a-datasource-failed-to-determine-a-suitable-driver-class/

 

Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured. Reason: F

Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured exception occurs when the datasource url is not configured in the spring boot application.properties. The spring boot reason is Reason: Fa

www.yawintutor.com

 

'Spring > Batch' 카테고리의 다른 글

spring batch 개요 및 아키텍처  (0) 2022.09.12
spring batch의 핵심 10가지  (0) 2022.09.12
[Job parameter] 오류 _ Step already complete or not restartable, so no action to execute : All steps already completed or no steps configured for this job.  (0) 2022.08.31
[spring batch] job parameter 공백(space) 포함하는 경우.  (0) 2022.08.24
    'Spring/Batch' 카테고리의 다른 글
    • spring batch 개요 및 아키텍처
    • spring batch의 핵심 10가지
    • [Job parameter] 오류 _ Step already complete or not restartable, so no action to execute : All steps already completed or no steps configured for this job.
    • [spring batch] job parameter 공백(space) 포함하는 경우.
    HANDA개발
    HANDA개발

    티스토리툴바

    단축키

    내 블로그

    내 블로그 - 관리자 홈 전환
    Q
    Q
    새 글 쓰기
    W
    W

    블로그 게시글

    글 수정 (권한 있는 경우)
    E
    E
    댓글 영역으로 이동
    C
    C

    모든 영역

    이 페이지의 URL 복사
    S
    S
    맨 위로 이동
    T
    T
    티스토리 홈 이동
    H
    H
    단축키 안내
    Shift + /
    ⇧ + /

    * 단축키는 한글/영문 대소문자로 이용 가능하며, 티스토리 기본 도메인에서만 동작합니다.