분류 전체보기

    [On To Java 2] Chapter 3: How to declare variables

    59. A variable is a chunk of computer memory that contains a value. The name of a variable is an identifier that refers to the variable. A variable's data type determines the size of the chunk and the way that the bits in the chunk are interpreted. If the data type of a variable is int, the variable holds a 32-bit signed integer. If the data type of a variable is double, the variable holds a 64-..

    [On To Java 2] Chapter 2: How to compile and execute a simple program

    package com.practice.doit.chapter1; public class Demonstrate { public static void main(String[] args) { System.out.println("The rating of the movie is: "); System.out.println(6+9+8); } } 46. Said with more precision, print and println are display methods that are defined to work on instances of the PrintStream class. System.out is an expression that produces the particular instance of the PrintS..

    한글 2 byte의 기준은 무엇인가?

    데이터 입출력 스트림을 공부하던 중 궁금한게 생겼다. 한글이 2 byte인거는 알고 있었는데, 글자 통째로 2 바이트인지 아니면 타수에 따라 바이트 수가 달라지는지 문득 궁금해졌다. 예를 들자면, 김이라는 글자가 있을 때 김 한 글자 통째로 2 바이트인지 아니면 ㄱ,ㅣ,ㅁ -> 각각 2 바이트씩 총 6 바이트가 되는지 정답은 여기서 찾을 수 있었다. [영어는 1BYTE이면서 한글은 2BYTE인 이유] 똑같은 한 글자인데.. 왜 차이가 나는 걸까요? ----------------------글자의 수 때문입니다.애초 컴퓨터는 알파벳을 바탕으로 만들어졌기 때문에, 그들 문자가 충분히 들어갈 정도의 2진수 공간만 있 m.cafe.daum.net 한글은 글자 타수 하나씩 바이트를 세는게 아니라 글자를 통째로 카운..

    [MySQL] mac 터미널에서 서버 접속, 데이터베이스 생성, 선택

    1. MySQL server 시작하기 mysql.server start 2. root 계정으로 비밀번호 이용해 접속 mysql -u root -p 3. 현재 생성되어 있는 데이터베이스 확인 SHOW databases; 4. 데이터베이스 생성 CREATE DATABASE study_mysql default CHARACTER SET UTF8; *데이터베이스 조작어는 대문자를 사용* study_mysql 이라는 이름의 데이터베이스 생성 character set을 UTF8로 지정 4. 사용할 데이터베이스 선택 USE study_mysql;

    [DB] 관계형 데이터베이스의 정의와 종류

    관계형 데이터베이스 '관계 대수(relational algebra)' 라는 것에 착안하여 고안한 데이터베이스. 행과 열을 가지는 표 형식 데이터를 저장하는 형태의 데이터베이스를 가리킨다. (엄밀히 말하자면, 관계 대수는 표 형식 데이터와는 아무런 관계가 없다는 점 기억하자) 표 형식 데이터란? 가로 방향으로는 '열'을, 세로 방향으로는 '행'을 나열하는 2차원 데이터를 의미한다. RDMS 제품 1. Oracle 현재 가장 많이 쓰이는 RDBMS 중 하나로, RDBMS의 사실상 표준이라고 해도 무방하다. 최신 Oracle Database에 대한 자세한 내용 데이터베이스 19c를 사용하여 비즈니스 전략을 확장하고 온프레미스 또는 클라우드에서 실행되는 모든 데이터 워크로드에 대해 더 높은 성능을 확보하십시오...

    [DB] DB와 DBMS, SQL이란 무엇인가

    DB와 DBMS 데이터베이스 (DB, Database) : 특정 데이터를 확인하고 싶을 때 간단하게 찾아낼 수 있도록 정리된 형태 저장장치 내에 정리되어 저장된 데이터의 집합 데이터베이스 관리 시스템 (DBMS, Databse Management System) 데이터베이스를 효율적으로 관리하는 소프트웨어 DBMS가 필요한 이유: 1. 생산성 시스템을 구축할 때 기본 기능부터 구현하는 것은 비용 측면에서 효율적이지 않다. 데이터 검색, 추가, 삭제, 갱신과 같은 기본 기능은 DBMS가 제공함으로써 생산성 향상을 도모할 수 있다. 2. 기능성 DBMS는 데이터베이스를 다루는 기능을 제공한다. 또한 데이터베이스 관리 기능을 유저가 확장할 수도 있어 유연하게 시스템을 개발할 수 있다. 3. 신뢰성 대규모 데이터..

    [에러] @DataJpaTest 할 때 UnsatisfiedDependencyException

    @DataJpaTest class AccountRepositoryTest { @Autowired AccountRepository accountRepository; @Autowired TestEntityManager testEntityManager; @Test void testFindName(){ //given String axl = "Axl Rose"; Account account = new Account(11L, axl, "10_000"); testEntityManager.persist(account); //when List actual = accountRepository.findByNumber(axl); //then assertThat(actual).hasSize(1); assertThat(actua..

    RestTemplate get 비교 시 객체 처리

    @Test @Order(2) void testGetStudent() throws Exception{ ResponseEntity result = restTemplate.getForEntity( "/students/{id}", Student.class, 1L); assertThat(result.getBody()) .isEqualTo(new Student(1L, "Dave", 100)); } Equals 메소드가 구현되어 있지 않으면 해쉬코드를 비교한다. @EqualsAndHashCode 어노테이션을 붙이거나 메소드를 구현하면 정상적으로 작동한다. public boolean equals(final Object o) { if (o == this) return true; if (!(o instanceof Stud..

    Spring Boot에서 RestTemplate 빈 등록을 해야할까?

    이 댓글 보고 찾아보았다. RestTemplateAutoConfiguration (Spring Boot 3.0.0 API) java.lang.Object org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration docs.spring.io @Bean public RestTemplate restTemplate(){ return new RestTemplate(); } 그냥 new해서 레스트 템플릿 만들면 동작은 하는데 서버에 올리면 장애가 날거다. accountOpenApi가 backendServer를 호출해서 작업하는 리소스가 부족해서 응답을 느리게 해주면 openApi는 무한대로 기다리게 된다. 해결 방법 RestTemp..

    [에러] Interface 기반 DTO Projection NULL 에러 원인과 해결 방법

    package com.academy.certificate.domain; import java.time.LocalDateTime; public interface ToBeResidentList { Long getResidentSerialNumber(); String getName(); LocalDateTime getBirthDate(); String getGenderCode(); } Resident 엔티티의 필드 중 주민 일련번호, 이름, 생년월일, 성별 코드를 가지고 오는 DTO Projection이다 데이터베이스에서 해당하는 값을 가지고 오는 JPQL 쿼리는 다음과 같았다. @Query("SELECT r.residentSerialNumber, r.name, r.birthDate, r.genderCode ..