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

Spring MVC modules #2579

Merged
merged 1 commit into from
Jul 14, 2022
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package tech.jhipster.lite.generator.buildtool.generic.domain;

import java.util.List;
import java.util.Optional;
import tech.jhipster.lite.error.domain.GeneratorException;
import tech.jhipster.lite.generator.buildtool.gradle.domain.GradleService;
Expand Down Expand Up @@ -38,15 +37,6 @@ public void addVersionPropertyAndDependency(Project project, String versionPrope
addDependency(project, dependencyWithVersion);
}

@Override
public void addDependency(Project project, Dependency dependency, List<Dependency> exclusions) {
if (project.isMavenProject()) {
mavenService.addDependency(project, dependency, exclusions);
} else {
throw new GeneratorException(EXCEPTION_NO_BUILD_TOOL);
}
}

@Override
public void addDependencyManagement(Project project, Dependency dependency) {
if (project.isMavenProject()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package tech.jhipster.lite.generator.buildtool.generic.domain;

import java.util.List;
import java.util.Optional;
import tech.jhipster.lite.generator.project.domain.Project;

public interface BuildToolService {
void addDependency(Project project, Dependency dependency);
void addDependency(Project project, Dependency dependency, List<Dependency> exclusions);
void addDependencyManagement(Project project, Dependency dependency);
void addProperty(Project project, String key, String value);
void addVersionPropertyAndDependency(Project project, String versionProperty, Dependency dependency);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ private GeneratorAction() {}
public static final String USER_AND_AUTHORITY_ENTITIES_MYSQL = "user-and-authority-entities-mysql";
public static final String USER_AND_AUTHORITY_ENTITIES_MARIADB = "user-and-authority-entities-mariadb";

public static final String SPRINGBOOT_TOMCAT = "springboot-tomcat";
public static final String SPRINGBOOT_UNDERTOW = "springboot-undertow";
public static final String SPRINGBOOT_ACTUATOR = "springboot-actuator";

public static final String REACT_CYPRESS = "react-cypress";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
package tech.jhipster.lite.generator.server.springboot.mvc.web.application;

import org.springframework.stereotype.Service;
import tech.jhipster.lite.generator.project.domain.Project;
import tech.jhipster.lite.generator.server.springboot.mvc.web.domain.SpringBootMvcService;
import tech.jhipster.lite.generator.server.springboot.mvc.web.domain.SpringBootMvcsModulesFactory;
import tech.jhipster.lite.module.domain.JHipsterModule;
import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;

@Service
public class SpringBootMvcApplicationService {

private final SpringBootMvcService springBootMvcService;
private final SpringBootMvcsModulesFactory factory;

public SpringBootMvcApplicationService(SpringBootMvcService springBootMvcService) {
this.springBootMvcService = springBootMvcService;
public SpringBootMvcApplicationService() {
factory = new SpringBootMvcsModulesFactory();
}

public void init(Project project) {
this.springBootMvcService.init(project);
public JHipsterModule buildTomcatModule(JHipsterModuleProperties properties) {
return factory.buildTomcatModule(properties);
}

public void addSpringBootMvc(Project project) {
springBootMvcService.addSpringBootMvc(project);
}

public void addSpringBootUndertow(Project project) {
springBootMvcService.addSpringBootUndertow(project);
}

public void addExceptionHandler(Project project) {
springBootMvcService.addExceptionHandler(project);
public JHipsterModule buildUndertowModule(JHipsterModuleProperties properties) {
return factory.buildUntertowModule(properties);
}
}

This file was deleted.

This file was deleted.

This file was deleted.

Loading