Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[20210207] MySQL ON DUPLICATE KEY UPDATE(MERGE INTO), spring.factories #34

Open
JuHyun419 opened this issue Feb 7, 2021 · 0 comments
Open

Comments

@JuHyun419
Copy link
Owner

JuHyun419 commented Feb 7, 2021

MySQL ON DUPLICATE KEY UPDATE = 데이터가 있으면 UPDATE, 없으면 INSERT (오라클의 MERGE INTO)

  • 오라클
    • MERGE INTO
  • MySQL
    • ON DUPLICATE KEY UPDATE

예시(MySQL)

INSERT INTO table (seq, name)
VALUES (null, 'JuHyun')
ON DUPLICATE KEY UPDATE
name = 'JuHyunUpdate'

spring.factories (Java ServiceLoader 참고)

  • SpringBoot가 미리 정의해둔 AutoConfiguration 정보들(Bean)
  • @componentscan 과 spring.factories 파일에 사전 정의한 AutoConfiguration 내용에 의해 스프링에서 Bean이 생성됨

TIL 1

TIL 2

@JuHyun419 JuHyun419 changed the title [20210207] MySQL ON DUPLICATE KEY UPDATE(MERGE INTO) [20210207] MySQL ON DUPLICATE KEY UPDATE(MERGE INTO), spring.factories Feb 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant