Skip to content

Commit

Permalink
Refactoring: move Consul to Spring Cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalgrimaud committed Jan 6, 2022
1 parent 88703ad commit d3c4bfc
Show file tree
Hide file tree
Showing 16 changed files with 24 additions and 24 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package tech.jhipster.lite.generator.server.springboot.consul.application;
package tech.jhipster.lite.generator.server.springboot.springcloud.consul.application;

import org.springframework.stereotype.Service;
import tech.jhipster.lite.generator.project.domain.Project;
import tech.jhipster.lite.generator.server.springboot.consul.domain.ConsulService;
import tech.jhipster.lite.generator.server.springboot.springcloud.consul.domain.ConsulService;

@Service
public class ConsulApplicationService {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tech.jhipster.lite.generator.server.springboot.consul.domain;
package tech.jhipster.lite.generator.server.springboot.springcloud.consul.domain;

import tech.jhipster.lite.generator.buildtool.generic.domain.Dependency;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package tech.jhipster.lite.generator.server.springboot.consul.domain;
package tech.jhipster.lite.generator.server.springboot.springcloud.consul.domain;

import static tech.jhipster.lite.common.domain.FileUtils.getPath;
import static tech.jhipster.lite.generator.project.domain.Constants.*;
import static tech.jhipster.lite.generator.project.domain.DefaultConfig.BASE_NAME;
import static tech.jhipster.lite.generator.server.springboot.consul.domain.Consul.*;
import static tech.jhipster.lite.generator.server.springboot.springcloud.consul.domain.Consul.*;

import tech.jhipster.lite.generator.buildtool.generic.domain.BuildToolService;
import tech.jhipster.lite.generator.project.domain.Project;
import tech.jhipster.lite.generator.project.domain.ProjectRepository;

public class ConsulDomainService implements ConsulService {

public static final String SOURCE = "server/springboot/consul";
public static final String SOURCE = "server/springboot/springcloud/consul";

private final BuildToolService buildToolService;
private final ProjectRepository projectRepository;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tech.jhipster.lite.generator.server.springboot.consul.domain;
package tech.jhipster.lite.generator.server.springboot.springcloud.consul.domain;

import tech.jhipster.lite.generator.project.domain.Project;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package tech.jhipster.lite.generator.server.springboot.consul.infrastructure.config;
package tech.jhipster.lite.generator.server.springboot.springcloud.consul.infrastructure.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import tech.jhipster.lite.generator.buildtool.generic.domain.BuildToolService;
import tech.jhipster.lite.generator.project.domain.ProjectRepository;
import tech.jhipster.lite.generator.server.springboot.consul.domain.ConsulDomainService;
import tech.jhipster.lite.generator.server.springboot.consul.domain.ConsulService;
import tech.jhipster.lite.generator.server.springboot.springcloud.consul.domain.ConsulDomainService;
import tech.jhipster.lite.generator.server.springboot.springcloud.consul.domain.ConsulService;

@Configuration
public class ConsulBeanConfiguration {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tech.jhipster.lite.generator.server.springboot.consul.infrastructure.primary.rest;
package tech.jhipster.lite.generator.server.springboot.springcloud.consul.infrastructure.primary.rest;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
Expand All @@ -9,11 +9,11 @@
import org.springframework.web.bind.annotation.RestController;
import tech.jhipster.lite.generator.project.domain.Project;
import tech.jhipster.lite.generator.project.infrastructure.primary.dto.ProjectDTO;
import tech.jhipster.lite.generator.server.springboot.consul.application.ConsulApplicationService;
import tech.jhipster.lite.generator.server.springboot.springcloud.consul.application.ConsulApplicationService;

@RestController
@RequestMapping("/api/servers/spring-boot/spring-cloud/consul")
@Tag(name = "Spring Boot - Cloud")
@Tag(name = "Spring Boot - Spring Cloud")
class ConsulResource {

private final ConsulApplicationService consulApplicationService;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@tech.jhipster.lite.BusinessContext
package tech.jhipster.lite.generator.server.springboot.springcloud.consul;
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package tech.jhipster.lite.generator.server.springboot.consul.application;
package tech.jhipster.lite.generator.server.springboot.springcloud.consul.application;

import static tech.jhipster.lite.TestUtils.tmpProject;
import static tech.jhipster.lite.generator.project.domain.DefaultConfig.BASE_NAME;
import static tech.jhipster.lite.generator.server.springboot.consul.application.ConsulAssert.*;
import static tech.jhipster.lite.generator.server.springboot.springcloud.consul.application.ConsulAssert.*;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package tech.jhipster.lite.generator.server.springboot.consul.application;
package tech.jhipster.lite.generator.server.springboot.springcloud.consul.application;

import static tech.jhipster.lite.TestUtils.assertFileContent;
import static tech.jhipster.lite.TestUtils.assertFileExist;
import static tech.jhipster.lite.common.domain.FileUtils.getPath;
import static tech.jhipster.lite.generator.project.domain.Constants.MAIN_RESOURCES;
import static tech.jhipster.lite.generator.project.domain.Constants.TEST_RESOURCES;
import static tech.jhipster.lite.generator.server.springboot.consul.domain.Consul.getDockerConsulImage;
import static tech.jhipster.lite.generator.server.springboot.consul.domain.Consul.getSpringCloudVersion;
import static tech.jhipster.lite.generator.server.springboot.springcloud.consul.domain.Consul.getDockerConsulImage;
import static tech.jhipster.lite.generator.server.springboot.springcloud.consul.domain.Consul.getSpringCloudVersion;

import java.util.List;
import tech.jhipster.lite.generator.project.domain.Project;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package tech.jhipster.lite.generator.server.springboot.consul.infrastructure.config;
package tech.jhipster.lite.generator.server.springboot.springcloud.consul.infrastructure.config;

import static org.assertj.core.api.Assertions.assertThat;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import tech.jhipster.lite.IntegrationTest;
import tech.jhipster.lite.generator.server.springboot.consul.domain.ConsulDomainService;
import tech.jhipster.lite.generator.server.springboot.springcloud.consul.domain.ConsulDomainService;

@IntegrationTest
class ConsulBeanConfigurationIT {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package tech.jhipster.lite.generator.server.springboot.consul.infrastructure.primary.rest;
package tech.jhipster.lite.generator.server.springboot.springcloud.consul.infrastructure.primary.rest;

import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static tech.jhipster.lite.generator.server.springboot.consul.application.ConsulAssert.*;
import static tech.jhipster.lite.generator.server.springboot.springcloud.consul.application.ConsulAssert.*;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down

0 comments on commit d3c4bfc

Please sign in to comment.