Repository: jhipster/jhipster-lite
Pull request #12081 (2025-03-11 21:07:53)

React: rename ReactCore to React
Same syntax as:

- https://github.com/jhipster/jhipster-lite/blob/main/src/main/java/tech/jhipster/lite/generator/client/angular/core/application/AngularApplicationService.java
- https://github.com/jhipster/jhipster-lite/blob/main/src/main/java/tech/jhipster/lite/generator/client/vue/core/application/VueApplicationService.java


Patch:
diff --git a/src/main/java/tech/jhipster/lite/generator/client/react/core/application/ReactCoreApplicationService.java b/src/main/java/tech/jhipster/lite/generator/client/react/core/application/ReactApplicationService.java
similarity index 67%
rename from src/main/java/tech/jhipster/lite/generator/client/react/core/application/ReactCoreApplicationService.java
rename to src/main/java/tech/jhipster/lite/generator/client/react/core/application/ReactApplicationService.java
index 1a789fc1f..81e025979 100644
--- a/src/main/java/tech/jhipster/lite/generator/client/react/core/application/ReactCoreApplicationService.java
+++ b/src/main/java/tech/jhipster/lite/generator/client/react/core/application/ReactApplicationService.java
@@ -1,18 +1,18 @@
 package tech.jhipster.lite.generator.client.react.core.application;
 
 import org.springframework.stereotype.Service;
-import tech.jhipster.lite.generator.client.react.core.domain.ReactCoreModulesFactory;
+import tech.jhipster.lite.generator.client.react.core.domain.ReactModulesFactory;
 import tech.jhipster.lite.module.domain.JHipsterModule;
 import tech.jhipster.lite.module.domain.npm.NpmLazyInstaller;
 import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
 
 @Service
-public class ReactCoreApplicationService {
+public class ReactApplicationService {
 
-  private final ReactCoreModulesFactory factory;
+  private final ReactModulesFactory factory;
 
-  public ReactCoreApplicationService(NpmLazyInstaller npmLazyInstaller) {
-    factory = new ReactCoreModulesFactory(npmLazyInstaller);
+  public ReactApplicationService(NpmLazyInstaller npmLazyInstaller) {
+    factory = new ReactModulesFactory(npmLazyInstaller);
   }
 
   public JHipsterModule buildModule(JHipsterModuleProperties properties) {
diff --git a/src/main/java/tech/jhipster/lite/generator/client/react/core/domain/ReactCoreModulesFactory.java b/src/main/java/tech/jhipster/lite/generator/client/react/core/domain/ReactModulesFactory.java
similarity index 98%
rename from src/main/java/tech/jhipster/lite/generator/client/react/core/domain/ReactCoreModulesFactory.java
rename to src/main/java/tech/jhipster/lite/generator/client/react/core/domain/ReactModulesFactory.java
index 633d7703f..6d7416470 100644
--- a/src/main/java/tech/jhipster/lite/generator/client/react/core/domain/ReactCoreModulesFactory.java
+++ b/src/main/java/tech/jhipster/lite/generator/client/react/core/domain/ReactModulesFactory.java
@@ -28,7 +28,7 @@ import tech.jhipster.lite.module.domain.file.JHipsterSource;
 import tech.jhipster.lite.module.domain.npm.NpmLazyInstaller;
 import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
 
-public class ReactCoreModulesFactory {
+public class ReactModulesFactory {
 
   private static final JHipsterSource SOURCE = from("client/react/core");
 
@@ -51,7 +51,7 @@ public class ReactCoreModulesFactory {
 
   private final NpmLazyInstaller npmLazyInstaller;
 
-  public ReactCoreModulesFactory(NpmLazyInstaller npmLazyInstaller) {
+  public ReactModulesFactory(NpmLazyInstaller npmLazyInstaller) {
     this.npmLazyInstaller = npmLazyInstaller;
   }
 
diff --git a/src/main/java/tech/jhipster/lite/generator/client/react/core/infrastructure/primary/ReactCoreModulesConfiguration.java b/src/main/java/tech/jhipster/lite/generator/client/react/core/infrastructure/primary/ReactModulesConfiguration.java
similarity index 90%
rename from src/main/java/tech/jhipster/lite/generator/client/react/core/infrastructure/primary/ReactCoreModulesConfiguration.java
rename to src/main/java/tech/jhipster/lite/generator/client/react/core/infrastructure/primary/ReactModulesConfiguration.java
index 76929f189..bbfa1deaa 100644
--- a/src/main/java/tech/jhipster/lite/generator/client/react/core/infrastructure/primary/ReactCoreModulesConfiguration.java
+++ b/src/main/java/tech/jhipster/lite/generator/client/react/core/infrastructure/primary/ReactModulesConfiguration.java
@@ -7,18 +7,18 @@ import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.TYPESCRIPT;
 
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
-import tech.jhipster.lite.generator.client.react.core.application.ReactCoreApplicationService;
+import tech.jhipster.lite.generator.client.react.core.application.ReactApplicationService;
 import tech.jhipster.lite.module.domain.resource.JHipsterModuleOrganization;
 import tech.jhipster.lite.module.domain.resource.JHipsterModulePropertiesDefinition;
 import tech.jhipster.lite.module.domain.resource.JHipsterModuleResource;
 
 @Configuration
-class ReactCoreModulesConfiguration {
+class ReactModulesConfiguration {
 
   public static final String REACT = "react";
 
   @Bean
-  JHipsterModuleResource reactCoreModule(ReactCoreApplicationService react) {
+  JHipsterModuleResource reactModule(ReactApplicationService react) {
     return JHipsterModuleResource.builder()
       .slug(REACT_CORE)
       .propertiesDefinition(properties())


Test patch:
diff --git a/src/test/java/tech/jhipster/lite/generator/client/react/core/domain/ReactCoreModulesFactoryTest.java b/src/test/java/tech/jhipster/lite/generator/client/react/core/domain/ReactModulesFactoryTest.java
similarity index 98%
rename from src/test/java/tech/jhipster/lite/generator/client/react/core/domain/ReactCoreModulesFactoryTest.java
rename to src/test/java/tech/jhipster/lite/generator/client/react/core/domain/ReactModulesFactoryTest.java
index 31cd550cc..5b31ac280 100644
--- a/src/test/java/tech/jhipster/lite/generator/client/react/core/domain/ReactCoreModulesFactoryTest.java
+++ b/src/test/java/tech/jhipster/lite/generator/client/react/core/domain/ReactModulesFactoryTest.java
@@ -23,10 +23,10 @@ import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
 
 @UnitTest
 @ExtendWith(MockitoExtension.class)
-class ReactCoreModulesFactoryTest {
+class ReactModulesFactoryTest {
 
   @InjectMocks
-  private ReactCoreModulesFactory factory;
+  private ReactModulesFactory factory;
 
   @Mock
   private NpmLazyInstaller npmLazyInstaller;