Coder Social home page Coder Social logo

sponge-server's Introduction

sponge-server's People

Contributors

jaesungahn91 avatar

Watchers

 avatar

sponge-server's Issues

JPA Entity Enum Converter 사용

리팩토링전 코드에서는 Entity의 필드로 Enum의 code를 사용하도록 작성

@Column(name = "city_code")
private Integer cityCode;

이는 DTO와 Entity 변환시 매핑을 해야하는 불편함이 존재

this.cityName = CityType.valueOf(study.getCityCode()).getName();

Hibernate 6 deprecated legacy annotations: @TypeDef. @TypeDefs

https://docs.jboss.org/hibernate/orm/6.0/userguide/html_single/Hibernate_User_Guide.html#basic-mapping

The following sections focus on approaches introduced in version 6 to influence how Hibernate will map basic value to the database.This includes removal of the following deprecated legacy 
annotations:@TypeDef@TypeDefs@CollectionId#type@AnyMetaDef#metaType@AnyMetaDef#idTypeSee the 6.0 
migration guide for discussions about migrating uses of these annotationsThe new annotations added as part of 6.0 
support composing mappings in annotations through "meta-annotations".
@TypeDefs({
        @TypeDef(
            name = "json",
            typeClass = JsonBinaryType.class,
            defaultForType = JsonNode.class
        ),
        @TypeDef(
                name = "list-array",
                typeClass = ListArrayType.class
        )
})

@Type(type = "json")
private JsonNode menuJson;

@Type(type = "list-array")
private List<Integer> steps = new ArrayList<>();
  • spring boot 버전을 2.x 에서 3.x 로 마이그레이션하면서 hibernate-core 6.x 버전으로 변경되면서 몇몇 annotation들이 deprecated 되었다.

testcontainers 사용

  • 기존에 로컬 환경에서 h2 database를 사용하면서 지원하지 않는 type에 대한 문제
  • MODE를 변경할지 testcontainers를 사용할지 고민하다 testcontainers 사용해보고 싶어서 결정

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.