Skip to content

Commit

Permalink
Merge pull request #97 from JNU-econovation/rename_api_to_main_api
Browse files Browse the repository at this point in the history
[CHORE] api 모듈 이름을 main-api로 변경
  • Loading branch information
inferior3x authored Dec 18, 2024
2 parents 8b0b163 + adeee3c commit f3b238c
Show file tree
Hide file tree
Showing 61 changed files with 152 additions and 153 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion modules/infrastructure/api-query-jpa/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repositories {
}

dependencies {
compileOnly project(":modules:api")
compileOnly project(":modules:main-api")

compileOnly 'org.springframework.boot:spring-boot-starter-data-jpa:3.3.5'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.whoz_in.api_query_domain_jpa;
package com.whoz_in.api_query_jpa;

import jakarta.persistence.Entity;
import jakarta.persistence.Id;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.whoz_in.api_query_domain_jpa.device_info;
package com.whoz_in.api_query_jpa.device_info;

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 java.util.List;
import com.whoz_in.main_api.query.device_info.application.DeviceInfo;
import com.whoz_in.main_api.query.device_info.application.DeviceInfoViewer;
import com.whoz_in.main_api.query.device_info.application.DevicesInfo;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

Expand Down
2 changes: 1 addition & 1 deletion modules/infrastructure/spring/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repositories {

dependencies {
compileOnly project(':modules:domain')
compileOnly project(':modules:api')
compileOnly project(':modules:main-api')

testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.whoz_in.spring.application.command;

import com.whoz_in.api.shared.application.command.Command;
import com.whoz_in.api.shared.application.command.CommandHandler;
import com.whoz_in.main_api.shared.application.command.Command;
import com.whoz_in.main_api.shared.application.command.CommandHandler;
import java.lang.reflect.ParameterizedType;
import java.util.Map;
import java.util.stream.Collectors;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.whoz_in.spring.application.command;

import com.whoz_in.api.shared.application.command.Command;
import com.whoz_in.api.shared.application.command.CommandBus;
import com.whoz_in.api.shared.application.command.CommandHandler;
import com.whoz_in.main_api.shared.application.command.Command;
import com.whoz_in.main_api.shared.application.command.CommandBus;
import com.whoz_in.main_api.shared.application.command.CommandHandler;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.whoz_in.spring.application.query;

import com.whoz_in.api.shared.application.query.Query;
import com.whoz_in.api.shared.application.query.QueryHandler;
import com.whoz_in.main_api.shared.application.query.Query;
import com.whoz_in.main_api.shared.application.query.QueryHandler;
import java.lang.reflect.ParameterizedType;
import java.util.Map;
import java.util.stream.Collectors;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.whoz_in.spring.application.query;

import com.whoz_in.api.shared.application.query.Query;
import com.whoz_in.api.shared.application.query.QueryBus;
import com.whoz_in.api.shared.application.query.QueryHandler;
import com.whoz_in.api.shared.application.query.Response;
import com.whoz_in.main_api.shared.application.query.Query;
import com.whoz_in.main_api.shared.application.query.QueryBus;
import com.whoz_in.main_api.shared.application.query.QueryHandler;
import com.whoz_in.main_api.shared.application.query.Response;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.whoz_in.api;
package com.whoz_in.main_api;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication(scanBasePackages = {"com.whoz_in"})
public class WhozInApiApplication {
public class MainApiApplication {

public static void main(String[] args) {
SpringApplication.run(WhozInApiApplication.class, args);
SpringApplication.run(MainApiApplication.class, args);
}

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.whoz_in.api.command.device.application;
package com.whoz_in.main_api.command.device.application;

import com.whoz_in.api.shared.application.command.Command;
import com.whoz_in.main_api.shared.application.command.Command;
import com.whoz_in.domain.device.model.IpAddress;
import com.whoz_in.domain.device.model.MacAddress;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.whoz_in.api.command.device.application;
package com.whoz_in.main_api.command.device.application;

import com.whoz_in.api.shared.application.Handler;
import com.whoz_in.api.shared.application.command.CommandHandler;
import com.whoz_in.api.shared.utils.RequesterInfo;
import com.whoz_in.main_api.shared.application.Handler;
import com.whoz_in.main_api.shared.application.command.CommandHandler;
import com.whoz_in.main_api.shared.utils.RequesterInfo;
import com.whoz_in.domain.device.DeviceRepository;
import com.whoz_in.domain.device.model.Device;
import com.whoz_in.domain.shared.event.EventBus;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.whoz_in.main_api.command.member.presentation;

import com.whoz_in.main_api.shared.presentation.CommandQueryController;
import com.whoz_in.main_api.shared.application.command.CommandBus;
import com.whoz_in.main_api.shared.application.query.QueryBus;

public class AuthController extends CommandQueryController {
public AuthController(CommandBus commandBus, QueryBus queryBus) {
super(commandBus, queryBus);
}

}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.whoz_in.api.command.member.presentation;
package com.whoz_in.main_api.command.member.presentation;

import com.whoz_in.api.shared.presentation.CommandQueryController;
import com.whoz_in.api.shared.application.command.CommandBus;
import com.whoz_in.api.shared.application.query.QueryBus;
import com.whoz_in.main_api.shared.presentation.CommandQueryController;
import com.whoz_in.main_api.shared.application.command.CommandBus;
import com.whoz_in.main_api.shared.application.query.QueryBus;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.whoz_in.api.config;
package com.whoz_in.main_api.config;

import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy;
import org.springframework.context.annotation.Bean;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.whoz_in.main_api.query.device_info.application;

import com.whoz_in.main_api.shared.application.query.Response;
import com.whoz_in.main_api.shared.application.query.View;

public final class DeviceInfo implements Response, View {

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.whoz_in.api.query.device_info.application;
package com.whoz_in.main_api.query.device_info.application;

import com.whoz_in.api.shared.application.query.Query;
import com.whoz_in.main_api.shared.application.query.Query;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.whoz_in.api.query.device_info.application;
package com.whoz_in.main_api.query.device_info.application;

import com.whoz_in.api.shared.application.Handler;
import com.whoz_in.api.shared.application.query.QueryHandler;
import com.whoz_in.main_api.shared.application.Handler;
import com.whoz_in.main_api.shared.application.query.QueryHandler;
import lombok.RequiredArgsConstructor;

@Handler
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.whoz_in.api.query.device_info.application;
package com.whoz_in.main_api.query.device_info.application;


import com.whoz_in.api.shared.application.query.Viewer;
import com.whoz_in.main_api.shared.application.query.Viewer;

public interface DeviceInfoViewer extends Viewer {
DeviceInfo findByDeviceId(Long deviceId);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.whoz_in.main_api.query.device_info.application;

import com.whoz_in.main_api.shared.application.query.Response;
import com.whoz_in.main_api.shared.application.query.View;

public final class DevicesInfo implements Response, View {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.whoz_in.main_api.query.device_info.application;

import com.whoz_in.main_api.shared.application.query.Query;

public final class DevicesInfoGet implements Query {

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.whoz_in.api.query.device_info.application;
package com.whoz_in.main_api.query.device_info.application;

import com.whoz_in.api.shared.application.Handler;
import com.whoz_in.api.shared.application.query.QueryHandler;
import com.whoz_in.main_api.shared.application.Handler;
import com.whoz_in.main_api.shared.application.query.QueryHandler;
import lombok.RequiredArgsConstructor;

@Handler
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.whoz_in.api.query.device_info.presentation;
package com.whoz_in.main_api.query.device_info.presentation;

import com.whoz_in.api.query.device_info.application.DeviceInfoGet;
import com.whoz_in.api.shared.application.command.CommandBus;
import com.whoz_in.api.shared.application.query.QueryBus;
import com.whoz_in.api.shared.presentation.CommandQueryController;
import com.whoz_in.api.shared.presentation.response.CrudResponseCode;
import com.whoz_in.api.shared.presentation.response.ResponseEntityGenerator;
import com.whoz_in.main_api.query.device_info.application.DeviceInfoGet;
import com.whoz_in.main_api.shared.application.command.CommandBus;
import com.whoz_in.main_api.shared.application.query.QueryBus;
import com.whoz_in.main_api.shared.presentation.CommandQueryController;
import com.whoz_in.main_api.shared.presentation.response.CrudResponseCode;
import com.whoz_in.main_api.shared.presentation.response.ResponseEntityGenerator;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.whoz_in.main_api.query.member.application;


import com.whoz_in.main_api.shared.application.query.Query;

public class MemberGet implements Query {

}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.whoz_in.api.query.member.application;
package com.whoz_in.main_api.query.member.application;


import com.whoz_in.api.shared.application.Handler;
import com.whoz_in.api.shared.application.query.QueryHandler;
import com.whoz_in.main_api.shared.application.Handler;
import com.whoz_in.main_api.shared.application.query.QueryHandler;

@Handler
public class MemberGetHandler extends QueryHandler<MemberGet, MemberResponse> {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.whoz_in.main_api.query.member.application;

import com.whoz_in.main_api.shared.application.query.Response;
import lombok.Getter;

@Getter
public final class MemberResponse implements Response {

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.whoz_in.api.shared.application;
package com.whoz_in.main_api.shared.application;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.whoz_in.api.shared.application.command;
package com.whoz_in.main_api.shared.application.command;

/*
userService.login(String userId)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.whoz_in.api.shared.application.command;
package com.whoz_in.main_api.shared.application.command;

/*
받은 Command에 따라 적절한 CommandHandler에게 명령을 전달하는 인터페이스.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.whoz_in.api.shared.application.command;
package com.whoz_in.main_api.shared.application.command;

/*
우리의 새로운 서비스의 기능을 추가하고 싶을 때마다 이 핸들러와 적절한 Command를 구현하면 된다.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.whoz_in.main_api.shared.application.query;

public interface Query {

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.whoz_in.api.shared.application.query;
package com.whoz_in.main_api.shared.application.query;

public interface QueryBus {
<R extends Response> R ask(Query query);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.whoz_in.api.shared.application.query;
package com.whoz_in.main_api.shared.application.query;

/*
형변환 없이 구현체마다 다른 Response를 제공하기 위해 제네릭을 사용했습니다.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.whoz_in.main_api.shared.application.query;

public interface Response {

}
Loading

0 comments on commit f3b238c

Please sign in to comment.