Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CHORE] query 구현 모듈의 기술 변경 / 루트 모듈 그룹명 변경 #37

Merged
merged 2 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id 'java'
}

group = 'com.Whoz-In'
group = 'com.whoz_in'
version = '0.0.1-SNAPSHOT'

java {
Expand Down
2 changes: 1 addition & 1 deletion modules/api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies {

//for api DI (runtimeOnly - 순환 의존 방지)
runtimeOnly project(":modules:infrastructure:spring")
runtimeOnly project(":modules:infrastructure:api-query-domain-jpa")
runtimeOnly project(":modules:infrastructure:api-query-jpa")

//직접 의존
implementation 'org.springframework.boot:spring-boot-starter'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ repositories {

dependencies {
compileOnly project(":modules:api")
implementation project(":modules:infrastructure:domain-jpa")

implementation 'org.springframework.boot:spring-boot-starter-data-jpa:3.3.4'
// runtimeOnly 'com.mysql:mysql-connector-j:8.3.0'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.whoz_in.api_query_domain_jpa;

import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import org.hibernate.annotations.Immutable;
import org.hibernate.annotations.Subselect;
import org.hibernate.annotations.Synchronize;

@Entity
@Immutable
@Subselect("SELECT "
+ "d.device_id AS deviceId "
+ "FROM device_entity d")
@Synchronize({"device_entity"})
public class Device {
@Id
private Long deviceId;

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,22 @@
import com.whoz_in.api.query.device_info.application.DeviceInfo;
import com.whoz_in.api.query.device_info.application.DeviceInfoViewer;
import com.whoz_in.api.query.device_info.application.DevicesInfo;
import com.whoz_in.domain_jpa.device.DeviceEntity;
import com.whoz_in.domain_jpa.device.DeviceJpaRepository;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

@Component
@RequiredArgsConstructor
public class DeviceInfoJpaViewer implements DeviceInfoViewer {
private final DeviceJpaRepository deviceJpaRepository;

@Override
public DeviceInfo findByDeviceId(Long deviceId) {
deviceJpaRepository.findById(deviceId);
deviceJpaRepository.save(new DeviceEntity());
return new DeviceInfo();
}

@Override
public DevicesInfo findAll() {
List<DeviceEntity> devices = deviceJpaRepository.findAll();

return new DevicesInfo();
}
}
4 changes: 2 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ include 'modules:infrastructure:domain-jpa'
findProject(':modules:infrastructure:domain-jpa')?.name = 'domain-jpa'
include 'modules:infrastructure:spring'
findProject(':modules:infrastructure:spring')?.name = 'spring'
include 'modules:infrastructure:api-query-domain-jpa'
findProject(':modules:infrastructure:api-query-domain-jpa')?.name = 'api-query-domain-jpa'
include 'modules:infrastructure:api-query-jpa'
findProject(':modules:infrastructure:api-query-jpa')?.name = 'api-query-jpa'

Loading