More issues

[vue] 테이블 데이터에 연결된 proxy(array) 데이터를 배열로 변환

엑셀형태의 테이블 데이터를 서버에 변수로 보낼 경우 테이블 렌더링에 사용되는 배열 데이터를 바로 사용하면 type이 달라 에러가 발생한다. const list = ref( [] ); . . . axios.post( 'localhost:8080/api/test', list.value ... ) list.value 타입을 확인해 보면 proxy(array) 라는 형인데 toRaw 함수를 사용하면 순수 배열로 변경이 가능하다 const list = ref(
1 min read

[cors] spring boot 에서 cors

package com.kodegen.moneyplan.config; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.CorsRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @Configuration public class WebConfig implements WebMvcConfigurer { @Override public void addCorsMappings( CorsRegistry registry ) { registry.addMapping( "/**" ).allowedOrigins( "*" ); } } WebConfig 라는 클래스 만들고
1 min read

[jpa] entity 의 생성일, 수정일을 자동으로 설정하기

대부분의 테이블 컬럼에는 생성일과 수정일이 존재한다. 이걸 매번 entity 에 선언해서 쓰기 귀찮을때 사용하는 방법을 소개한다. application 실행 파일에 @EnableJpaAuditing 추가 @EnableJpaAuditing @SpringBootApplication public class CmsApiApplication { ... } 부모 entitiy 수정 @Data @MappedSuperclass @EntityListeners( AuditingEntityListener.class ) public abstract class BaseEntity { @Column( name = "created_date", nullable = false, updatable = false ) @CreatedDate public
1 min read

Subscribe to X세대 신입사원

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe
774-86-01972 cinnabar.3d@gmail.com