This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🌞 Morning 61 commits ██▌░░░░░░░░░░░░░░░░░░ 12.2% | |
🌆 Daytime 67 commits ██▊░░░░░░░░░░░░░░░░░░ 13.4% | |
🌃 Evening 201 commits ████████▍░░░░░░░░░░░░ 40.3% | |
🌙 Night 170 commits ███████▏░░░░░░░░░░░░░ 34.1% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package jpabook.start; | |
import javax.persistence.*; | |
import java.util.List; | |
public class JpaMain { | |
public static void main(String[] args) { | |
//엔티티 매니저 팩토리 생성 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" version="2.1"> | |
<persistence-unit name="jpabook"> | |
<properties> | |
<!-- 필수 속성 --> | |
<property name="javax.persistence.jdbc.driver" value="org.h2.Driver"/> | |
<property name="javax.persistence.jdbc.user" value="sa"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.persistence.*; | |
@Entity | |
@Table(name="MEMBER") | |
public class Member { | |
@Id | |
@Column(name = "ID") | |
private String id; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Member { | |
private String id; | |
private String username; | |
private Integer age; | |
public String getId() { | |
return id; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string> | |
#include <vector> | |
using namespace std; | |
const int INF = 987654321; | |
char get_score(double cur) { | |
if (cur >= 90.0) return 'A'; | |
if (cur >= 80.0) return 'B'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hello.hellospring.aop; | |
import org.aspectj.lang.ProceedingJoinPoint; | |
import org.aspectj.lang.annotation.Around; | |
import org.aspectj.lang.annotation.Aspect; | |
import org.springframework.stereotype.Component; | |
@Aspect | |
@Component | |
public class TimeTraceAop { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Long join(Member member) { | |
long start = System.currentTimeMillis(); | |
try { | |
// 핵심 관심 사항 | |
validateDuplicateMember(member); | |
memberRepository.save(member); | |
return member.getId(); | |
} finally { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hello.hellospring.service; | |
import hello.hellospring.repository.*; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import javax.persistence.EntityManager; | |
import javax.sql.DataSource; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hello.hellospring.repository; | |
import hello.hellospring.domain.Member; | |
import org.springframework.data.jpa.repository.JpaRepository; | |
import java.util.Optional; | |
public interface SpringDataJpaMemberRepository extends JpaRepository<Member, Long>, MemberRepository { | |
@Override |
NewerOlder