til
til copied to clipboard
Today I Learned
`https://github.com/spring-projects/spring-data-jpa/issues/1129` Spring Data JPA 에서 쿼리 만들 때 `@Param` 사용하지 않는 방법이 있는데, 컴파일 할 때 `-parameters` 플래그를 지정해줘야한다. https://stackoverflow.com/questions/44067477/drawbacks-of-javac-parameters-flag 단점은 용량이 조금 커지는거 이외에 없는듯
https://www.baeldung.com/spring-security-method-security
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-Config-Data-Migration-Guide
https://blog.toyseed.tech/2020/01/06/macos-ideavim-problem/
1. 포트가 사용중일 경우 : 컴퓨터를 재시작하는게 제일 빠름 2. 메모리 설정이 없을 경우 : `setting("maxmemory 128M")` 코드를 추가함 ```java // https://github.com/kstyrc/embedded-redis/issues/51#issuecomment-318221233 @Configuration @Profile("test") public class EmbeddedRedisServer { @Value("${spring.redis.port:6380}") private...
``` int i = jws.lastIndexOf('.') String withoutSignature = jws.substring(0, i+1); Jwt untrusted = Jwts.parser().parseClaimsJwt(withoutSignature); ```
http://honeymon.io/tech/2020/07/09/gradle-annotation-processor-with-querydsl.html
Team 에 속한 User 의 이름으로 팀을 검색하고 싶을 경우 `QTeam.team.members.any().name.eq("alex")` 를 사용한다. where 조건이 다음과 같이 실행된다. ``` where exists ( select 1 from user u where t.id=u.team_id and...
기본 동작은 모든 레코드를 검색하는 쿼리가 실행되고, 컬렉션의 사이즈가 반환된다. `@LazyCollection(LazyCollectionOption.EXTRA)` 를 사용할 경우, `size()` 를 호출하면 `count` 쿼리가 실행되고 실제 컬렉션의 아이템을 사용할 때에 `select` 쿼리가 수행된다. - https://www.baeldung.com/hibernate-lazycollection
User -> Box 로 @OneToOne 관계가 설정되었을 경우 User의 box 필드는 null 이 될 수 있다. Lazy Loading 은 프록시를 사용는데, 프록시가 null 을 대체할 수는 없으므로 (== user.getBox() 값이...