Skip to content

Commit

Permalink
[hotfix] refactor: PlaceEntity에 @RedisHash 어노테이션 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
jinkonu committed Jan 12, 2025
1 parent 774c6f3 commit 6191071
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
import lombok.NoArgsConstructor;
import org.recordy.server.common.domain.JpaMetaInfoEntity;
import org.recordy.server.location.domain.LocationEntity;
import org.springframework.data.redis.core.RedisHash;

import java.time.LocalDateTime;

@AllArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
@RedisHash("place")
@Table(name = "places")
@Entity
public class PlaceEntity extends JpaMetaInfoEntity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ public PlaceGetResponse getDetailById(Long id) {
@Scheduled(cron = "0 0 * * * *")
@Transactional
public void cacheAll() {
List<Place> places = placeRepository.findAll();
System.out.println("places.size() = " + places.size());
places.forEach(placeRepository::cache);
placeRepository.findAll()
.forEach(placeRepository::cache);
}
}

0 comments on commit 6191071

Please sign in to comment.