patchEslintConfig(JHipsterModuleProperti
.add(eslintTypescriptVueRule("'vue/html-self-closing': 'off',", properties.indentation()))
.add(eslintTypescriptVueRule("'@typescript-eslint/no-explicit-any': 'off',", properties.indentation()))
.add(eslintTypescriptVueRule("'@typescript-eslint/no-empty-object-type': 'off',", properties.indentation()))
+ .add(eslintTypescriptVueRule("'@typescript-eslint/consistent-type-imports': 'error',", properties.indentation()))
.and()
.and();
//@formatter:on
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/langchain4j/application/LangChain4jApplicationService.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/langchain4j/application/LangChain4jApplicationService.java
new file mode 100644
index 00000000000..1576bb54e8c
--- /dev/null
+++ b/src/main/java/tech/jhipster/lite/generator/server/springboot/langchain4j/application/LangChain4jApplicationService.java
@@ -0,0 +1,20 @@
+package tech.jhipster.lite.generator.server.springboot.langchain4j.application;
+
+import org.springframework.stereotype.Service;
+import tech.jhipster.lite.generator.server.springboot.langchain4j.domain.LangChain4jModuleFactory;
+import tech.jhipster.lite.module.domain.JHipsterModule;
+import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
+
+@Service
+public class LangChain4jApplicationService {
+
+ private final LangChain4jModuleFactory factory;
+
+ public LangChain4jApplicationService() {
+ factory = new LangChain4jModuleFactory();
+ }
+
+ public JHipsterModule buildModule(JHipsterModuleProperties properties) {
+ return factory.buildModule(properties);
+ }
+}
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/langchain4j/domain/LangChain4jModuleFactory.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/langchain4j/domain/LangChain4jModuleFactory.java
new file mode 100644
index 00000000000..09dbe3d6efa
--- /dev/null
+++ b/src/main/java/tech/jhipster/lite/generator/server/springboot/langchain4j/domain/LangChain4jModuleFactory.java
@@ -0,0 +1,51 @@
+package tech.jhipster.lite.generator.server.springboot.langchain4j.domain;
+
+import static tech.jhipster.lite.module.domain.JHipsterModule.*;
+
+import tech.jhipster.lite.module.domain.JHipsterModule;
+import tech.jhipster.lite.module.domain.file.JHipsterSource;
+import tech.jhipster.lite.module.domain.javabuild.ArtifactId;
+import tech.jhipster.lite.module.domain.javabuild.GroupId;
+import tech.jhipster.lite.module.domain.javabuild.VersionSlug;
+import tech.jhipster.lite.module.domain.javaproperties.PropertyKey;
+import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
+import tech.jhipster.lite.shared.error.domain.Assert;
+
+public class LangChain4jModuleFactory {
+
+ private static final String API_KEY_DEMO_COMMENT =
+ "You can temporarily use 'demo' key, which is provided for free for demonstration purposes";
+
+ private static final JHipsterSource SOURCE = from("server/springboot/langchain4j");
+ private static final GroupId GROUP_ID = groupId("dev.langchain4j");
+ private static final ArtifactId ARTIFACT_ID = artifactId("langchain4j-spring-boot-starter");
+ private static final ArtifactId OPEN_AI_ARTIFACT_ID = artifactId("langchain4j-open-ai-spring-boot-starter");
+ private static final VersionSlug VERSION_SLUG = versionSlug("langchain4j");
+
+ private static final String PROPERTIES = "properties";
+ private static final PropertyKey LANGCHAIN4J_PROPERTY_API_KEY = propertyKey("langchain4j.open-ai.chat-model.api-key");
+
+ public JHipsterModule buildModule(JHipsterModuleProperties properties) {
+ Assert.notNull(PROPERTIES, properties);
+
+ //@formatter:off
+ return moduleBuilder(properties)
+ .documentation(documentationTitle("LangChain4j"), SOURCE.template("langchain4j.md"))
+ .javaDependencies()
+ .addDependency(GROUP_ID, ARTIFACT_ID, VERSION_SLUG)
+ .addDependency(GROUP_ID, OPEN_AI_ARTIFACT_ID, VERSION_SLUG)
+ .and()
+ .springMainProperties()
+ .set(LANGCHAIN4J_PROPERTY_API_KEY, propertyValue("demo"))
+ .comment(LANGCHAIN4J_PROPERTY_API_KEY, comment(API_KEY_DEMO_COMMENT))
+ .set(propertyKey("langchain4j.open-ai.chat-model.model-name"), propertyValue("gpt-4o-mini"))
+ .set(propertyKey("langchain4j.open-ai.chat-model.log-requests"), propertyValue("true"))
+ .set(propertyKey("langchain4j.open-ai.chat-model.log-responses"), propertyValue("true"))
+ .and()
+ .springTestProperties()
+ .set(LANGCHAIN4J_PROPERTY_API_KEY, propertyValue("jhipster"))
+ .and()
+ .build();
+ //@formatter:on
+ }
+}
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/langchain4j/infrastructure/primary/LangChain4jModuleConfiguration.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/langchain4j/infrastructure/primary/LangChain4jModuleConfiguration.java
new file mode 100644
index 00000000000..870e2f54041
--- /dev/null
+++ b/src/main/java/tech/jhipster/lite/generator/server/springboot/langchain4j/infrastructure/primary/LangChain4jModuleConfiguration.java
@@ -0,0 +1,26 @@
+package tech.jhipster.lite.generator.server.springboot.langchain4j.infrastructure.primary;
+
+import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.LANGCHAIN4J;
+import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.SPRING_BOOT;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import tech.jhipster.lite.generator.server.springboot.langchain4j.application.LangChain4jApplicationService;
+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 LangChain4jModuleConfiguration {
+
+ @Bean
+ JHipsterModuleResource langChain4jModule(LangChain4jApplicationService langChain4j) {
+ return JHipsterModuleResource.builder()
+ .slug(LANGCHAIN4J)
+ .propertiesDefinition(JHipsterModulePropertiesDefinition.builder().addProjectBaseName().addIndentation().build())
+ .apiDoc("LangChain4j", "Add LangChain4j")
+ .organization(JHipsterModuleOrganization.builder().addDependency(SPRING_BOOT).build())
+ .tags("server", "spring", "spring-boot", "langchain4j")
+ .factory(langChain4j::buildModule);
+ }
+}
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/langchain4j/package-info.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/langchain4j/package-info.java
new file mode 100644
index 00000000000..1d7a2fab36d
--- /dev/null
+++ b/src/main/java/tech/jhipster/lite/generator/server/springboot/langchain4j/package-info.java
@@ -0,0 +1,2 @@
+@tech.jhipster.lite.BusinessContext
+package tech.jhipster.lite.generator.server.springboot.langchain4j;
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/mvc/sample/langchain4j/application/SampleLangChain4jApplicationService.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/mvc/sample/langchain4j/application/SampleLangChain4jApplicationService.java
new file mode 100644
index 00000000000..e8fe52f63fc
--- /dev/null
+++ b/src/main/java/tech/jhipster/lite/generator/server/springboot/mvc/sample/langchain4j/application/SampleLangChain4jApplicationService.java
@@ -0,0 +1,20 @@
+package tech.jhipster.lite.generator.server.springboot.mvc.sample.langchain4j.application;
+
+import org.springframework.stereotype.Service;
+import tech.jhipster.lite.generator.server.springboot.mvc.sample.langchain4j.domain.SampleLangChain4jModuleFactory;
+import tech.jhipster.lite.module.domain.JHipsterModule;
+import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
+
+@Service
+public class SampleLangChain4jApplicationService {
+
+ private final SampleLangChain4jModuleFactory factory;
+
+ public SampleLangChain4jApplicationService() {
+ factory = new SampleLangChain4jModuleFactory();
+ }
+
+ public JHipsterModule buildModule(JHipsterModuleProperties properties) {
+ return factory.buildModule(properties);
+ }
+}
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/mvc/sample/langchain4j/domain/SampleLangChain4jModuleFactory.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/mvc/sample/langchain4j/domain/SampleLangChain4jModuleFactory.java
new file mode 100644
index 00000000000..8edc458dbe6
--- /dev/null
+++ b/src/main/java/tech/jhipster/lite/generator/server/springboot/mvc/sample/langchain4j/domain/SampleLangChain4jModuleFactory.java
@@ -0,0 +1,39 @@
+package tech.jhipster.lite.generator.server.springboot.mvc.sample.langchain4j.domain;
+
+import static tech.jhipster.lite.module.domain.JHipsterModule.*;
+
+import tech.jhipster.lite.module.domain.JHipsterModule;
+import tech.jhipster.lite.module.domain.file.JHipsterDestination;
+import tech.jhipster.lite.module.domain.file.JHipsterSource;
+import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
+import tech.jhipster.lite.shared.error.domain.Assert;
+
+public class SampleLangChain4jModuleFactory {
+
+ private static final String SAMPLE = "sample";
+
+ private static final JHipsterSource SOURCE = from("server/springboot/mvc/sample/langchain4j");
+
+ private static final String PRIMARY = "infrastructure/primary";
+
+ public JHipsterModule buildModule(JHipsterModuleProperties properties) {
+ Assert.notNull("properties", properties);
+
+ String packagePath = properties.packagePath();
+ JHipsterDestination mainDestination = toSrcMainJava().append(packagePath).append(SAMPLE);
+ JHipsterDestination testDestination = toSrcTestJava().append(packagePath).append(SAMPLE);
+
+ //@formatter:off
+ return moduleBuilder(properties)
+ .files()
+ .batch(SOURCE.append("main").append(PRIMARY), mainDestination.append(PRIMARY))
+ .addTemplate("ChatResource.java")
+ .and()
+ .batch(SOURCE.append("test").append(SAMPLE).append(PRIMARY), testDestination.append(PRIMARY))
+ .addTemplate("ChatResourceTest.java")
+ .and()
+ .and()
+ .build();
+ //@formatter:on
+ }
+}
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/mvc/sample/langchain4j/infrastructure/primary/SampleLangChain4jModuleConfiguration.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/mvc/sample/langchain4j/infrastructure/primary/SampleLangChain4jModuleConfiguration.java
new file mode 100644
index 00000000000..92e0f632273
--- /dev/null
+++ b/src/main/java/tech/jhipster/lite/generator/server/springboot/mvc/sample/langchain4j/infrastructure/primary/SampleLangChain4jModuleConfiguration.java
@@ -0,0 +1,28 @@
+package tech.jhipster.lite.generator.server.springboot.mvc.sample.langchain4j.infrastructure.primary;
+
+import static tech.jhipster.lite.shared.slug.domain.JHLiteFeatureSlug.SPRING_MVC_SERVER;
+import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.*;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import tech.jhipster.lite.generator.server.springboot.mvc.sample.langchain4j.application.SampleLangChain4jApplicationService;
+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 SampleLangChain4jModuleConfiguration {
+
+ @Bean
+ JHipsterModuleResource langChain4jResourceInit(SampleLangChain4jApplicationService applicationService) {
+ return JHipsterModuleResource.builder()
+ .slug(SPRING_BOOT_LANGCHAIN4J_SAMPLE)
+ .propertiesDefinition(
+ JHipsterModulePropertiesDefinition.builder().addBasePackage().addIndentation().addSpringConfigurationFormat().build()
+ )
+ .apiDoc("Spring Boot - LangChain4j", "Add LangChain4j sample")
+ .organization(JHipsterModuleOrganization.builder().addDependency(SPRING_MVC_SERVER).addDependency(LANGCHAIN4J).build())
+ .tags("spring-boot", "spring", "server", "langchain4j")
+ .factory(applicationService::buildModule);
+ }
+}
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/mvc/sample/langchain4j/package-info.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/mvc/sample/langchain4j/package-info.java
new file mode 100644
index 00000000000..a0e75e2f4d7
--- /dev/null
+++ b/src/main/java/tech/jhipster/lite/generator/server/springboot/mvc/sample/langchain4j/package-info.java
@@ -0,0 +1,2 @@
+@tech.jhipster.lite.BusinessContext
+package tech.jhipster.lite.generator.server.springboot.mvc.sample.langchain4j;
diff --git a/src/main/java/tech/jhipster/lite/module/domain/npm/NpmVersions.java b/src/main/java/tech/jhipster/lite/module/domain/npm/NpmVersions.java
index 51a9768313e..beb8e6cc199 100644
--- a/src/main/java/tech/jhipster/lite/module/domain/npm/NpmVersions.java
+++ b/src/main/java/tech/jhipster/lite/module/domain/npm/NpmVersions.java
@@ -20,7 +20,7 @@ public interface NpmVersions {
* source folder for this version
* @return The version
* @throws UnknownNpmPackageException
- * is the package can't be found in source
+ * if the package can't be found in source
*/
default NpmPackageVersion get(NpmPackageName packageName, NpmVersionSource source) {
return get().get(packageName, source);
@@ -35,7 +35,7 @@ default NpmPackageVersion get(NpmPackageName packageName, NpmVersionSource sourc
* source folder for this version
* @return The version
* @throws UnknownNpmPackageException
- * is the package can't be found in source
+ * if the package can't be found in source
*/
default NpmPackageVersion get(String packageName, NpmVersionSource source) {
return get(new NpmPackageName(packageName), source);
@@ -50,7 +50,7 @@ default NpmPackageVersion get(String packageName, NpmVersionSource source) {
* source folder for this version
* @return The version
* @throws UnknownNpmPackageException
- * is the package can't be found in source
+ * if the package can't be found in source
*/
default NpmPackageVersion get(String packageName, NpmVersionSourceFactory source) {
return get(packageName, source.build());
diff --git a/src/main/java/tech/jhipster/lite/module/infrastructure/secondary/npm/NpmVersionsReader.java b/src/main/java/tech/jhipster/lite/module/infrastructure/secondary/npm/NpmVersionsReader.java
index 448c37360e6..74e8216b2ab 100644
--- a/src/main/java/tech/jhipster/lite/module/infrastructure/secondary/npm/NpmVersionsReader.java
+++ b/src/main/java/tech/jhipster/lite/module/infrastructure/secondary/npm/NpmVersionsReader.java
@@ -4,7 +4,7 @@
/**
*
- * Read version for an npm dependency
+ * Read version for a npm dependency
*
*
*
diff --git a/src/main/java/tech/jhipster/lite/shared/error/domain/Assert.java b/src/main/java/tech/jhipster/lite/shared/error/domain/Assert.java
index 08a0a2f6016..77213a8b538 100644
--- a/src/main/java/tech/jhipster/lite/shared/error/domain/Assert.java
+++ b/src/main/java/tech/jhipster/lite/shared/error/domain/Assert.java
@@ -368,11 +368,11 @@ public StringAsserter notBlank() {
}
/**
- * Ensure that the value does not contain whitespace
+ * Ensure that the value does not contain whitespace
*
* @return The current asserter
* @throws MissingMandatoryValueException
- * if the value contain whitespace
+ * if the value contains whitespace
*/
public StringAsserter noWhitespace() {
notNull();
diff --git a/src/main/java/tech/jhipster/lite/shared/slug/domain/JHLiteModuleSlug.java b/src/main/java/tech/jhipster/lite/shared/slug/domain/JHLiteModuleSlug.java
index c769698cc71..60953e986df 100644
--- a/src/main/java/tech/jhipster/lite/shared/slug/domain/JHLiteModuleSlug.java
+++ b/src/main/java/tech/jhipster/lite/shared/slug/domain/JHLiteModuleSlug.java
@@ -157,7 +157,9 @@ public enum JHLiteModuleSlug implements JHipsterModuleSlugFactory {
VUE_OAUTH2_KEYCLOAK("vue-oauth2-keycloak"),
VUE_PINIA("vue-pinia"),
TS_PAGINATION_DOMAIN("ts-pagination-domain"),
- TS_REST_PAGINATION("ts-rest-pagination");
+ TS_REST_PAGINATION("ts-rest-pagination"),
+ LANGCHAIN4J("langchain4j"),
+ SPRING_BOOT_LANGCHAIN4J_SAMPLE("spring-boot-langchain4j-sample");
private static final Map moduleSlugMap = Stream.of(values()).collect(
Collectors.toMap(JHLiteModuleSlug::get, Function.identity())
diff --git a/src/main/resources/generator/buildtool/gradle/gradle/wrapper/gradle-wrapper.properties b/src/main/resources/generator/buildtool/gradle/gradle/wrapper/gradle-wrapper.properties
index df97d72b8b9..94113f200e6 100644
--- a/src/main/resources/generator/buildtool/gradle/gradle/wrapper/gradle-wrapper.properties
+++ b/src/main/resources/generator/buildtool/gradle/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
diff --git a/src/main/resources/generator/client/common/cypress/utils/DataSelector.ts b/src/main/resources/generator/client/common/cypress/utils/DataSelector.ts
index e0d3e7c69cd..00d0d5b5007 100755
--- a/src/main/resources/generator/client/common/cypress/utils/DataSelector.ts
+++ b/src/main/resources/generator/client/common/cypress/utils/DataSelector.ts
@@ -1 +1,2 @@
-export const dataSelector = (selector: string): string => `[data-selector="${selector}"]`;
+export const dataSelector = (selector: string): string =>
+ `[data-selector="${selector}"], [data-cy="${selector}"], [data-test="${selector}"], [data-testid="${selector}"]`;
diff --git a/src/main/resources/generator/client/common/cypress/utils/Interceptor.ts b/src/main/resources/generator/client/common/cypress/utils/Interceptor.ts
index da9e9663799..07602571751 100755
--- a/src/main/resources/generator/client/common/cypress/utils/Interceptor.ts
+++ b/src/main/resources/generator/client/common/cypress/utils/Interceptor.ts
@@ -1,4 +1,4 @@
-import { HttpResponseInterceptor, RouteMatcher, StaticResponse } from 'cypress/types/net-stubbing';
+import type { HttpResponseInterceptor, RouteMatcher, StaticResponse } from 'cypress/types/net-stubbing';
type ResponseSender = {
send: () => void;
diff --git a/src/main/resources/generator/client/common/hexagonal-documentation/front-hexagonal-architecture.md.mustache b/src/main/resources/generator/client/common/hexagonal-documentation/front-hexagonal-architecture.md.mustache
index 0e72434ead0..d555c48328f 100644
--- a/src/main/resources/generator/client/common/hexagonal-documentation/front-hexagonal-architecture.md.mustache
+++ b/src/main/resources/generator/client/common/hexagonal-documentation/front-hexagonal-architecture.md.mustache
@@ -123,7 +123,7 @@ export const homeRoutes = (): RouteRecordRaw[] => [
(example for vue.js, need some adaptation for other frontends frameworks)
-You can then append this routes to the main routes in `router.ts`:
+You can then append these routes to the main routes in `router.ts`:
```typescript
import { createRouter, createWebHistory } from 'vue-router';
diff --git a/src/main/resources/generator/client/common/playwright/common/primary/app/Home-Page.ts b/src/main/resources/generator/client/common/playwright/common/primary/app/Home-Page.ts
index 8d61573c7f2..8dbc0591176 100644
--- a/src/main/resources/generator/client/common/playwright/common/primary/app/Home-Page.ts
+++ b/src/main/resources/generator/client/common/playwright/common/primary/app/Home-Page.ts
@@ -1,4 +1,4 @@
-import { Page } from '@playwright/test';
+import { type Page } from '@playwright/test';
export class HomePage {
readonly page: Page;
diff --git a/src/main/resources/generator/client/react/i18n/src/main/webapp/app/i18n.ts b/src/main/resources/generator/client/react/i18n/src/main/webapp/app/i18n.ts
index 7c8b4967634..34d2c39109c 100644
--- a/src/main/resources/generator/client/react/i18n/src/main/webapp/app/i18n.ts
+++ b/src/main/resources/generator/client/react/i18n/src/main/webapp/app/i18n.ts
@@ -4,7 +4,7 @@ import { initReactI18next } from 'react-i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
import Backend from 'i18next-http-backend';
-void i18n
+i18n
.use(Backend)
.use(LanguageDetector)
.use(initReactI18next)
@@ -19,6 +19,9 @@ void i18n
backend: {
loadPath: '../assets/locales/{{ lng }}/{{ ns }}.json',
},
+ })
+ .catch(error => {
+ console.error('i18n initialization failed', error);
});
export default i18n;
diff --git a/src/main/resources/generator/client/react/security/jwt/src/test/webapp/unit/login/primary/loginForm/index.test.tsx.mustache b/src/main/resources/generator/client/react/security/jwt/src/test/webapp/unit/login/primary/loginForm/index.test.tsx.mustache
index 513c72e1621..3cac8855967 100644
--- a/src/main/resources/generator/client/react/security/jwt/src/test/webapp/unit/login/primary/loginForm/index.test.tsx.mustache
+++ b/src/main/resources/generator/client/react/security/jwt/src/test/webapp/unit/login/primary/loginForm/index.test.tsx.mustache
@@ -14,7 +14,7 @@ const login = async () => {
const { getByText, getByPlaceholderText, getByTestId } = render();
const loginButton = getByText('Log in');
fireEvent.click(loginButton);
- await act(async () => {
+ await act(() => {
fireEvent.change(getByPlaceholderText("Nom d'utilisateur"), {
target: { value: 'admin' },
});
@@ -40,7 +40,7 @@ describe('loginForm', () => {
fireEvent.click(loginButton);
expect(getByText('Connect')).toBeTruthy();
const submitButton = getByTestId('submit-button');
- await act(async () => {
+ await act(() => {
fireEvent.click(submitButton);
});
});
diff --git a/src/main/resources/generator/client/react/security/jwt/src/test/webapp/unit/login/primary/loginModal/index.test.tsx.mustache b/src/main/resources/generator/client/react/security/jwt/src/test/webapp/unit/login/primary/loginModal/index.test.tsx.mustache
index 0bfd9b2e3fb..e7d2756581c 100644
--- a/src/main/resources/generator/client/react/security/jwt/src/test/webapp/unit/login/primary/loginModal/index.test.tsx.mustache
+++ b/src/main/resources/generator/client/react/security/jwt/src/test/webapp/unit/login/primary/loginModal/index.test.tsx.mustache
@@ -37,7 +37,7 @@ describe('test login modal', () => {
it('should contain password input', async () => {
const { getByPlaceholderText, getByTestId } = LoginModalRender(true);
const username = getByPlaceholderText('Mot de passe');
- await act(async () => {
+ await act(() => {
const displayPasswordButton = getByTestId('display-password');
fireEvent.click(displayPasswordButton);
});
@@ -54,7 +54,7 @@ describe('test login modal', () => {
const { getByPlaceholderText, getByTestId } = LoginModalRender(true);
const spy = vi.spyOn(axios, 'post');
spy.mockImplementationOnce((): Promise => Promise.resolve({ data: {} }));
- await act(async () => {
+ await act(() => {
fireEvent.change(getByPlaceholderText("Nom d'utilisateur"), {
target: { value: 'admin' },
});
@@ -71,7 +71,7 @@ describe('test login modal', () => {
const { getByPlaceholderText, getByRole } = LoginModalRender(true);
const spy = vi.spyOn(axios, 'post');
spy.mockImplementationOnce((): Promise => Promise.resolve({ data: {} }));
- await act(async () => {
+ await act(() => {
fireEvent.change(getByPlaceholderText("Nom d'utilisateur"), {
target: { value: 'admin' },
});
@@ -86,7 +86,7 @@ describe('test login modal', () => {
it('should contain error message when submit button is clicked with empty value', async () => {
const { getByTestId } = LoginModalRender(true);
- await act(async () => {
+ await act(() => {
const submitButton = getByTestId('submit-button');
fireEvent.click(submitButton);
});
diff --git a/src/main/resources/generator/client/vue/documentation/vue-oauth2-keycloak-authentication-components.md b/src/main/resources/generator/client/vue/documentation/vue-oauth2-keycloak-authentication-components.md
index 49384df281d..e376bf8e119 100644
--- a/src/main/resources/generator/client/vue/documentation/vue-oauth2-keycloak-authentication-components.md
+++ b/src/main/resources/generator/client/vue/documentation/vue-oauth2-keycloak-authentication-components.md
@@ -423,7 +423,7 @@ Location: `src/test/webapp/unit/auth/infrastructure/secondary/KeycloakStub.ts`
This file provides a stub for Keycloak to be used in tests.
```typescript
-import Keycloak from 'keycloak-js';
+import type Keycloak from 'keycloak-js';
import sinon from 'sinon';
import type { SinonStub } from 'sinon';
diff --git a/src/main/resources/generator/client/vue/i18n/src/test/HomePageVue.spec.ts b/src/main/resources/generator/client/vue/i18n/src/test/HomePageVue.spec.ts
index b082d640bb7..536fa9cff77 100644
--- a/src/main/resources/generator/client/vue/i18n/src/test/HomePageVue.spec.ts
+++ b/src/main/resources/generator/client/vue/i18n/src/test/HomePageVue.spec.ts
@@ -1,5 +1,5 @@
import HomepageVue from '@/home/infrastructure/primary/HomepageVue.vue';
-import { shallowMount, VueWrapper } from '@vue/test-utils';
+import { shallowMount, type VueWrapper } from '@vue/test-utils';
import { describe, expect, it } from 'vitest';
let wrapper: VueWrapper;
diff --git a/src/main/resources/generator/client/vue/security/oauth2_keycloak/webapp/app/auth/application/AuthProvider.ts.mustache b/src/main/resources/generator/client/vue/security/oauth2_keycloak/webapp/app/auth/application/AuthProvider.ts.mustache
index 9ccdb2992a3..8bc094212d5 100644
--- a/src/main/resources/generator/client/vue/security/oauth2_keycloak/webapp/app/auth/application/AuthProvider.ts.mustache
+++ b/src/main/resources/generator/client/vue/security/oauth2_keycloak/webapp/app/auth/application/AuthProvider.ts.mustache
@@ -1,6 +1,6 @@
import type { AuthRepository } from '@/auth/domain/AuthRepository';
import { KeycloakAuthRepository } from '@/auth/infrastructure/secondary/KeycloakAuthRepository';
-import { KeycloakHttp } from '@/auth/infrastructure/secondary/KeycloakHttp';
+import { type KeycloakHttp } from '@/auth/infrastructure/secondary/KeycloakHttp';
import { provide } from '@/injections';
import { key } from 'piqure';
diff --git a/src/main/resources/generator/client/vue/security/oauth2_keycloak/webapp/app/auth/infrastructure/secondary/KeycloakAuthRepository.ts.mustache b/src/main/resources/generator/client/vue/security/oauth2_keycloak/webapp/app/auth/infrastructure/secondary/KeycloakAuthRepository.ts.mustache
index 6d9613b07dc..920ecbe6fb8 100644
--- a/src/main/resources/generator/client/vue/security/oauth2_keycloak/webapp/app/auth/infrastructure/secondary/KeycloakAuthRepository.ts.mustache
+++ b/src/main/resources/generator/client/vue/security/oauth2_keycloak/webapp/app/auth/infrastructure/secondary/KeycloakAuthRepository.ts.mustache
@@ -1,6 +1,6 @@
import type { AuthRepository } from '@/auth/domain/AuthRepository';
import type { AuthenticatedUser } from '@/auth/domain/AuthenticatedUser';
-import { KeycloakHttp } from './KeycloakHttp';
+import { type KeycloakHttp } from './KeycloakHttp';
export class KeycloakAuthRepository implements AuthRepository {
constructor(private readonly keycloakHttp: KeycloakHttp) {}
diff --git a/src/main/resources/generator/client/vue/security/oauth2_keycloak/webapp/app/auth/infrastructure/secondary/KeycloakHttp.ts.mustache b/src/main/resources/generator/client/vue/security/oauth2_keycloak/webapp/app/auth/infrastructure/secondary/KeycloakHttp.ts.mustache
index e21618f1ab4..7a7a9651a63 100644
--- a/src/main/resources/generator/client/vue/security/oauth2_keycloak/webapp/app/auth/infrastructure/secondary/KeycloakHttp.ts.mustache
+++ b/src/main/resources/generator/client/vue/security/oauth2_keycloak/webapp/app/auth/infrastructure/secondary/KeycloakHttp.ts.mustache
@@ -1,5 +1,5 @@
import type { AuthenticatedUser } from '@/auth/domain/AuthenticatedUser';
-import Keycloak from 'keycloak-js';
+import type Keycloak from 'keycloak-js';
export class KeycloakHttp {
private initialized: boolean = false;
diff --git a/src/main/resources/generator/client/vue/security/oauth2_keycloak/webapp/app/test/webapp/unit/auth/infrastructure/secondary/KeycloakStub.ts.mustache b/src/main/resources/generator/client/vue/security/oauth2_keycloak/webapp/app/test/webapp/unit/auth/infrastructure/secondary/KeycloakStub.ts.mustache
index d49fdea7498..c8a8ff8cff0 100644
--- a/src/main/resources/generator/client/vue/security/oauth2_keycloak/webapp/app/test/webapp/unit/auth/infrastructure/secondary/KeycloakStub.ts.mustache
+++ b/src/main/resources/generator/client/vue/security/oauth2_keycloak/webapp/app/test/webapp/unit/auth/infrastructure/secondary/KeycloakStub.ts.mustache
@@ -1,4 +1,4 @@
-import Keycloak from 'keycloak-js';
+import type Keycloak from 'keycloak-js';
import type { SinonStub } from 'sinon';
import sinon from 'sinon';
diff --git a/src/main/resources/generator/client/vue/webapp/app/env.d.ts.mustache b/src/main/resources/generator/client/vue/webapp/app/env.d.ts.mustache
index 025ac41ec43..2435bff5c02 100644
--- a/src/main/resources/generator/client/vue/webapp/app/env.d.ts.mustache
+++ b/src/main/resources/generator/client/vue/webapp/app/env.d.ts.mustache
@@ -1,7 +1,7 @@
///
declare module '*.vue' {
- import { DefineComponent } from 'vue';
+ import type DefineComponent from 'vue';
const component: DefineComponent<{}, {}, any>;
export default component;
}
diff --git a/src/main/resources/generator/client/vue/webapp/app/test/webapp/unit/router/infrastructure/primary/HomeRouter.spec.ts.mustache b/src/main/resources/generator/client/vue/webapp/app/test/webapp/unit/router/infrastructure/primary/HomeRouter.spec.ts.mustache
index b40d2e636ff..340d6a158d5 100644
--- a/src/main/resources/generator/client/vue/webapp/app/test/webapp/unit/router/infrastructure/primary/HomeRouter.spec.ts.mustache
+++ b/src/main/resources/generator/client/vue/webapp/app/test/webapp/unit/router/infrastructure/primary/HomeRouter.spec.ts.mustache
@@ -1,6 +1,6 @@
import HomepageVue from '@/home/infrastructure/primary/HomepageVue.vue';
import { routes } from '@/router';
-import { mount, VueWrapper } from '@vue/test-utils';
+import { mount, type VueWrapper } from '@vue/test-utils';
import { beforeEach, describe, expect, it } from 'vitest';
import { createRouter, createWebHistory, type Router } from 'vue-router';
diff --git a/src/main/resources/generator/dependencies/Dockerfile b/src/main/resources/generator/dependencies/Dockerfile
index 30187d9c750..466226ba33e 100644
--- a/src/main/resources/generator/dependencies/Dockerfile
+++ b/src/main/resources/generator/dependencies/Dockerfile
@@ -9,7 +9,7 @@ FROM mysql:9.1.0
FROM cassandra:5.0.2
FROM mcr.microsoft.com/mssql/server:2022-latest
FROM postgres:17.0
-FROM apache/kafka-native:3.8.1
+FROM apache/kafka-native:3.9.0
FROM tchiotludo/akhq:0.25.1
FROM apachepulsar/pulsar:4.0.0
FROM neo4j:5.25.1-community
diff --git a/src/main/resources/generator/dependencies/angular/package.json b/src/main/resources/generator/dependencies/angular/package.json
index 09d8b179efd..bc9071eeaf2 100644
--- a/src/main/resources/generator/dependencies/angular/package.json
+++ b/src/main/resources/generator/dependencies/angular/package.json
@@ -2,11 +2,11 @@
"dependencies": {
"@angular-builders/jest": "18.0.0",
"@angular/build": "18.2.11",
- "@angular/cdk": "18.2.11",
+ "@angular/cdk": "18.2.12",
"@angular/cli": "18.2.11",
- "@angular/compiler-cli": "18.2.10",
- "@angular/core": "18.2.10",
- "@angular/material": "18.2.11",
+ "@angular/compiler-cli": "18.2.11",
+ "@angular/core": "18.2.11",
+ "@angular/material": "18.2.12",
"angular-eslint": "18.4.0",
"jest-environment-jsdom": "29.7.0",
"jest-preset-angular": "14.2.4",
diff --git a/src/main/resources/generator/dependencies/common/package.json b/src/main/resources/generator/dependencies/common/package.json
index a6dabb840b0..720dd21ab4e 100644
--- a/src/main/resources/generator/dependencies/common/package.json
+++ b/src/main/resources/generator/dependencies/common/package.json
@@ -11,20 +11,20 @@
"@tikui/core": "6.2.1",
"@tsconfig/recommended": "1.0.8",
"@types/jest": "29.5.14",
- "@types/node": "22.8.6",
- "@typescript-eslint/eslint-plugin": "8.12.2",
- "@typescript-eslint/parser": "8.12.2",
+ "@types/node": "22.9.0",
+ "@typescript-eslint/eslint-plugin": "8.13.0",
+ "@typescript-eslint/parser": "8.13.0",
"@vitest/coverage-istanbul": "2.1.4",
"autoprefixer": "10.4.20",
"browser-sync": "3.0.3",
"cssnano": "7.0.6",
- "cypress": "13.15.1",
+ "cypress": "13.15.2",
"eslint": "9.14.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-cypress": "4.1.0",
- "globals": "15.11.0",
+ "globals": "15.12.0",
"husky": "9.1.6",
- "i18next": "23.16.4",
+ "i18next": "23.16.5",
"i18next-browser-languagedetector": "8.0.0",
"i18next-http-backend": "2.6.2",
"jest": "29.7.0",
@@ -38,7 +38,7 @@
"onchange": "7.1.0",
"path-exists-cli": "2.0.0",
"piqure": "2.1.1",
- "postcss": "8.4.47",
+ "postcss": "8.4.48",
"postcss-cli": "11.0.0",
"prettier": "3.3.3",
"prettier-plugin-gherkin": "3.1.0",
@@ -55,9 +55,9 @@
"tikuidoc-tikui": "8.0.0",
"ts-jest": "29.2.5",
"typescript": "5.6.2",
- "typescript-eslint": "8.12.2",
+ "typescript-eslint": "8.13.0",
"vite": "5.4.10",
- "vite-tsconfig-paths": "5.0.1",
+ "vite-tsconfig-paths": "5.1.2",
"vitest": "2.1.4",
"vitest-sonar-reporter": "2.0.0"
}
diff --git a/src/main/resources/generator/dependencies/gradle/libs.versions.toml b/src/main/resources/generator/dependencies/gradle/libs.versions.toml
index 45fed640c83..68ef18b9b31 100644
--- a/src/main/resources/generator/dependencies/gradle/libs.versions.toml
+++ b/src/main/resources/generator/dependencies/gradle/libs.versions.toml
@@ -1,5 +1,5 @@
[versions]
-checkstyle = "10.20.0"
+checkstyle = "10.20.1"
jib = "3.4.4"
git-properties = "2.4.2"
protobuf-plugin = "0.9.4"
diff --git a/src/main/resources/generator/dependencies/pom.xml b/src/main/resources/generator/dependencies/pom.xml
index f33b9269e26..4b84384691b 100644
--- a/src/main/resources/generator/dependencies/pom.xml
+++ b/src/main/resources/generator/dependencies/pom.xml
@@ -21,10 +21,10 @@
4.1.3
2.6.0
2.6.0
- 3.8.1
+ 3.9.0
5.5.0
- 2.13.3
- 4.29.2
+ 2.13.4
+ 4.30.0
0.10.2
0.12.6
3.17.0
@@ -40,7 +40,7 @@
1.0.1
2.1.0-M2
2.1.0-M4
- 2.2.0
+ 2.2.1
5.11.3
3.26.3
@@ -61,7 +61,7 @@
1.11
3.1.0
1.2.1
- 4.0.0.4121
+ 5.0.0.4389
3.5.0
3.4.4
3.13.0
@@ -70,6 +70,7 @@
3.1.0
0.0.21
1.0.3
+ 0.36.0
@@ -400,6 +401,16 @@
openapi-backwards-compat-maven-plugin
${openapi-backwards-compat-maven-plugin.version}
+
+ dev.langchain4j
+ langchain4j-spring-boot-starter
+ ${langchain4j.version}
+
+
+ dev.langchain4j
+ langchain4j-open-ai-spring-boot-starter
+ ${langchain4j.version}
+
diff --git a/src/main/resources/generator/dependencies/react/package.json b/src/main/resources/generator/dependencies/react/package.json
index f6b7d49f25e..95ca629725e 100644
--- a/src/main/resources/generator/dependencies/react/package.json
+++ b/src/main/resources/generator/dependencies/react/package.json
@@ -16,9 +16,8 @@
"eslint-plugin-react": "7.37.2",
"react": "18.3.1",
"react-dom": "18.3.1",
- "react-hook-form": "7.53.1",
- "react-i18next": "15.1.0",
- "react-scripts": "5.0.1",
+ "react-hook-form": "7.53.2",
+ "react-i18next": "15.1.1",
"sass": "1.80.6",
"ts-node": "10.9.2"
}
diff --git a/src/main/resources/generator/dependencies/vue/package.json b/src/main/resources/generator/dependencies/vue/package.json
index bb28b4bb8e7..c31a41192ec 100644
--- a/src/main/resources/generator/dependencies/vue/package.json
+++ b/src/main/resources/generator/dependencies/vue/package.json
@@ -4,16 +4,16 @@
"description": "JHipster Lite : used for Vite+Vue3 dependencies",
"license": "Apache-2.0",
"dependencies": {
- "@pinia/testing": "0.1.6",
+ "@pinia/testing": "0.1.7",
"@types/sinon": "17.0.3",
"@vitejs/plugin-vue": "5.1.4",
"@vue/test-utils": "2.4.6",
- "@vue/tsconfig": "0.5.1",
+ "@vue/tsconfig": "0.6.0",
"axios": "1.7.7",
"eslint-plugin-vue": "9.30.0",
"i18next-vue": "5.0.0",
- "pinia": "2.2.5",
- "pinia-plugin-persistedstate": "4.1.2",
+ "pinia": "2.2.6",
+ "pinia-plugin-persistedstate": "4.1.3",
"sinon": "19.0.2",
"vue": "3.5.12",
"vue-router": "4.4.5",
diff --git a/src/main/resources/generator/server/javatool/archunit/test/EqualsHashcodeArchTest.java.mustache b/src/main/resources/generator/server/javatool/archunit/test/EqualsHashcodeArchTest.java.mustache
index c7dc65aafd6..04932501d4e 100644
--- a/src/main/resources/generator/server/javatool/archunit/test/EqualsHashcodeArchTest.java.mustache
+++ b/src/main/resources/generator/server/javatool/archunit/test/EqualsHashcodeArchTest.java.mustache
@@ -27,7 +27,7 @@ class EqualsHashcodeArchTest {
private ArchCondition.ConditionByPredicate implementBothOrNone() {
return ArchCondition.from(
- new DescribedPredicate<>("Class should implement none or both method equals and hashcode") {
+ new DescribedPredicate<>("Class should implement none or both methods equals and hashcode") {
@Override
public boolean test(JavaClass clazz) {
return hasEquals(clazz) == hasHashCode(clazz);
diff --git a/src/main/resources/generator/server/javatool/archunit/test/HexagonalArchTest.java.mustache b/src/main/resources/generator/server/javatool/archunit/test/HexagonalArchTest.java.mustache
index b53385dc882..b39acf7b2d7 100644
--- a/src/main/resources/generator/server/javatool/archunit/test/HexagonalArchTest.java.mustache
+++ b/src/main/resources/generator/server/javatool/archunit/test/HexagonalArchTest.java.mustache
@@ -122,7 +122,7 @@ class HexagonalArchTest {
.mayNotBeAccessedByAnyLayer()
.whereLayer("secondary adapters")
.mayNotBeAccessedByAnyLayer()
- .because("Each bounded context should implement an hexagonal architecture")
+ .because("Each bounded context should implement a hexagonal architecture")
.check(classes)
);
}
diff --git a/src/main/resources/generator/server/sonar/sonar-project.properties.mustache b/src/main/resources/generator/server/sonar/sonar-project.properties.mustache
index 9d0492d0270..8ac1547b545 100644
--- a/src/main/resources/generator/server/sonar/sonar-project.properties.mustache
+++ b/src/main/resources/generator/server/sonar/sonar-project.properties.mustache
@@ -21,7 +21,7 @@ sonar.exclusions=\
src/main/webapp/app/index.tsx,\
src/main/webapp/main.ts
-sonar.issue.ignore.multicriteria=S117,S119,S125_1,S125_2,S3437,S4502,S4684,S4032,S5778,S6206,S6548,S6437,S6471,UndocumentedApi,S2301,S7027
+sonar.issue.ignore.multicriteria=S117,S119,S125_1,S125_2,S3437,S4502,S4684,S4032,S5778,S6206,S6548,S6437,UndocumentedApi,S2301,S7027
# Rule: Local variable and method parameter names should comply with a naming convention
# Handled with checkstyle. Should be revisited with java 25 once Unnamed Patterns and Variables are available (JEP 443)
@@ -74,10 +74,6 @@ sonar.issue.ignore.multicriteria.S6548.ruleKey=java:S6548
sonar.issue.ignore.multicriteria.S6437.resourceKey=src/main/resources/config/application.yml
sonar.issue.ignore.multicriteria.S6437.ruleKey=java:S6437
-# Rule: Run container as default user
-sonar.issue.ignore.multicriteria.S6471.resourceKey=src/main/docker/cassandra/**/*
-sonar.issue.ignore.multicriteria.S6471.ruleKey=docker:S6471
-
# Rule: Methods should not contain selector parameters
sonar.issue.ignore.multicriteria.S2301.resourceKey=src/main/webapp/app/auth/oauth2-auth.service.ts
sonar.issue.ignore.multicriteria.S2301.ruleKey=typescript:S2301
diff --git a/src/main/resources/generator/server/springboot/broker/kafka/KafkaTestContainerExtension.java.mustache b/src/main/resources/generator/server/springboot/broker/kafka/KafkaTestContainerExtension.java.mustache
index 75c427a7c31..1117c1f3cff 100644
--- a/src/main/resources/generator/server/springboot/broker/kafka/KafkaTestContainerExtension.java.mustache
+++ b/src/main/resources/generator/server/springboot/broker/kafka/KafkaTestContainerExtension.java.mustache
@@ -15,6 +15,8 @@ public class KafkaTestContainerExtension implements BeforeAllCallback {
public void beforeAll(final ExtensionContext context) {
if (!kafkaContainerStarted.get()) {
kafkaContainer = new KafkaContainer(DockerImageName.parse("{{kafkaDockerImage}}")).withNetwork(null);
+ // Waiting this issue https://github.com/testcontainers/testcontainers-java/issues/9506 to remove this line
+ kafkaContainer.withEnv("KAFKA_LISTENERS", "PLAINTEXT://:9092,BROKER://:9093,CONTROLLER://:9094");
kafkaContainer.start();
kafkaContainerStarted.set(true);
System.setProperty("kafka.bootstrap.servers", kafkaContainer.getBootstrapServers());
diff --git a/src/main/resources/generator/server/springboot/database/jpa/MsSQLTestContainerExtension.java.mustache b/src/main/resources/generator/server/springboot/database/jpa/MsSQLTestContainerExtension.java.mustache
index 9773bee5963..2355466c385 100644
--- a/src/main/resources/generator/server/springboot/database/jpa/MsSQLTestContainerExtension.java.mustache
+++ b/src/main/resources/generator/server/springboot/database/jpa/MsSQLTestContainerExtension.java.mustache
@@ -10,7 +10,7 @@ public class MsSQLTestContainerExtension implements BeforeAllCallback {
private static AtomicBoolean started = new AtomicBoolean(false);
- private static MSSQLServerContainer> container = new MSSQLServerContainer<>("{{mssqlDockerImageWithVersion}}")
+ private static MSSQLServerContainer> container = new MSSQLServerContainer<>("{{mssqlDockerImageWithVersion}}")
.withUrlParam("trustServerCertificate","true")
.acceptLicense();
diff --git a/src/main/resources/generator/server/springboot/dbmigration/cassandra/Cassandra-Migration.Dockerfile.mustache b/src/main/resources/generator/server/springboot/dbmigration/cassandra/Cassandra-Migration.Dockerfile.mustache
index e4b74a94b81..ebbc4b338dd 100644
--- a/src/main/resources/generator/server/springboot/dbmigration/cassandra/Cassandra-Migration.Dockerfile.mustache
+++ b/src/main/resources/generator/server/springboot/dbmigration/cassandra/Cassandra-Migration.Dockerfile.mustache
@@ -1,5 +1,7 @@
FROM {{ cassandraDockerImage }}
+RUN useradd -m cassandra_user
+
# script to orchestrate the automatic keyspace creation and apply all migration scripts
COPY cassandra/scripts/autoMigrate.sh /usr/local/bin/autoMigrate
RUN chmod 755 /usr/local/bin/autoMigrate
@@ -8,4 +10,6 @@ RUN chmod 755 /usr/local/bin/autoMigrate
COPY cassandra/scripts/execute-cql.sh /usr/local/bin/execute-cql
RUN chmod 755 /usr/local/bin/execute-cql
+USER cassandra_user
+
ENTRYPOINT ["autoMigrate"]
diff --git a/src/main/resources/generator/server/springboot/langchain4j/langchain4j.md.mustache b/src/main/resources/generator/server/springboot/langchain4j/langchain4j.md.mustache
new file mode 100644
index 00000000000..f2e0f630f77
--- /dev/null
+++ b/src/main/resources/generator/server/springboot/langchain4j/langchain4j.md.mustache
@@ -0,0 +1,5 @@
+# LangChain4j
+
+How to use it:
+
+[Official documentation](https://docs.langchain4j.dev/tutorials/spring-boot-integration/)
diff --git a/src/main/resources/generator/server/springboot/mvc/internationalized-errors/resources/assertions-errors/assertion-errors-messages.properties b/src/main/resources/generator/server/springboot/mvc/internationalized-errors/resources/assertions-errors/assertion-errors-messages.properties
index 7283baa260b..713dbea3a8f 100644
--- a/src/main/resources/generator/server/springboot/mvc/internationalized-errors/resources/assertions-errors/assertion-errors-messages.properties
+++ b/src/main/resources/generator/server/springboot/mvc/internationalized-errors/resources/assertions-errors/assertion-errors-messages.properties
@@ -29,5 +29,5 @@ assertion-error.STRING_TOO_SHORT.title=String too short
assertion-error.STRING_WITH_WHITESPACES.detail=The string {{ field }} must not have any whitespaces
assertion-error.STRING_WITH_WHITESPACES.title=String with whitespaces
-assertion-error.TOO_MANY_ELEMENTS.detail=There is too many elements in {{ field }}, max is {{ maxSize }} (current {{ currentSize }} element(s))
+assertion-error.TOO_MANY_ELEMENTS.detail=There are too many elements in {{ field }}, max is {{ maxSize }} (current {{ currentSize }} element(s))
assertion-error.TOO_MANY_ELEMENTS.title=Too many elements
diff --git a/src/main/resources/generator/server/springboot/mvc/internationalized-errors/resources/errors/application-errors-messages_fr.properties b/src/main/resources/generator/server/springboot/mvc/internationalized-errors/resources/errors/application-errors-messages_fr.properties
index 08ab58f760f..07046ab50ee 100644
--- a/src/main/resources/generator/server/springboot/mvc/internationalized-errors/resources/errors/application-errors-messages_fr.properties
+++ b/src/main/resources/generator/server/springboot/mvc/internationalized-errors/resources/errors/application-errors-messages_fr.properties
@@ -2,7 +2,7 @@
################################# Messages for errors #################################
#######################################################################################
-error.bad-request.detail=Votre requête n'est pas valide: {{ code }}
+error.bad-request.detail=Votre requête n'est pas valide : {{ code }}
error.bad-request.title=Bad request
error.internal-server-error.detail=Une erreur est survenue
diff --git a/src/main/resources/generator/server/springboot/mvc/internationalized-errors/test/ApplicationErrorsHandlerIT.java.mustache b/src/main/resources/generator/server/springboot/mvc/internationalized-errors/test/ApplicationErrorsHandlerIT.java.mustache
index dc839c15a39..be0c341cff1 100644
--- a/src/main/resources/generator/server/springboot/mvc/internationalized-errors/test/ApplicationErrorsHandlerIT.java.mustache
+++ b/src/main/resources/generator/server/springboot/mvc/internationalized-errors/test/ApplicationErrorsHandlerIT.java.mustache
@@ -32,6 +32,6 @@ class {{ baseName }}ErrorsHandlerIT {
.perform(get("/api/errors/bad-request").locale(Locale.FRANCE))
.andExpect(status().is4xxClientError())
.andExpect(jsonPath("title").value("Bad request"))
- .andExpect(jsonPath("detail").value("Votre requête n'est pas valide: 400"));
+ .andExpect(jsonPath("detail").value("Votre requête n'est pas valide : 400"));
}
}
diff --git a/src/main/resources/generator/server/springboot/mvc/internationalized-errors/test/AssertionErrorsHandlerIT.java.mustache b/src/main/resources/generator/server/springboot/mvc/internationalized-errors/test/AssertionErrorsHandlerIT.java.mustache
index 3ccdb6c2017..56deb3d7d70 100644
--- a/src/main/resources/generator/server/springboot/mvc/internationalized-errors/test/AssertionErrorsHandlerIT.java.mustache
+++ b/src/main/resources/generator/server/springboot/mvc/internationalized-errors/test/AssertionErrorsHandlerIT.java.mustache
@@ -93,7 +93,7 @@ class AssertionErrorsHandlerIT {
.perform(get("/api/assertion-errors/too-many-elements"))
.andExpect(status().isBadRequest())
.andExpect(jsonPath("title").value("Too many elements"))
- .andExpect(jsonPath("detail").value("There is too many elements in myField, max is 1 (current 2 element(s))"))
+ .andExpect(jsonPath("detail").value("There are too many elements in myField, max is 1 (current 2 element(s))"))
.andExpect(jsonPath("key").value("TOO_MANY_ELEMENTS"));
}
diff --git a/src/main/resources/generator/server/springboot/mvc/sample/langchain4j/main/infrastructure/primary/ChatResource.java.mustache b/src/main/resources/generator/server/springboot/mvc/sample/langchain4j/main/infrastructure/primary/ChatResource.java.mustache
new file mode 100644
index 00000000000..5098457c422
--- /dev/null
+++ b/src/main/resources/generator/server/springboot/mvc/sample/langchain4j/main/infrastructure/primary/ChatResource.java.mustache
@@ -0,0 +1,23 @@
+package {{packageName}}.sample.infrastructure.primary;
+
+import dev.langchain4j.model.chat.ChatLanguageModel;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/api")
+class ChatResource {
+
+ private final ChatLanguageModel chatLanguageModel;
+
+ public ChatResource(ChatLanguageModel chatLanguageModel) {
+ this.chatLanguageModel = chatLanguageModel;
+ }
+
+ @GetMapping("/chat")
+ public String send(@RequestParam(value = "message", defaultValue = "Hello") String message) {
+ return chatLanguageModel.generate(message);
+ }
+}
diff --git a/src/main/resources/generator/server/springboot/mvc/sample/langchain4j/test/sample/infrastructure/primary/ChatResourceTest.java.mustache b/src/main/resources/generator/server/springboot/mvc/sample/langchain4j/test/sample/infrastructure/primary/ChatResourceTest.java.mustache
new file mode 100644
index 00000000000..8ebb8a53d95
--- /dev/null
+++ b/src/main/resources/generator/server/springboot/mvc/sample/langchain4j/test/sample/infrastructure/primary/ChatResourceTest.java.mustache
@@ -0,0 +1,32 @@
+package {{packageName}}.sample.infrastructure.primary;
+
+import static org.assertj.core.api.Assertions.*;
+import static org.mockito.Mockito.*;
+
+import {{packageName}}.UnitTest;
+import dev.langchain4j.model.chat.ChatLanguageModel;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
+
+@UnitTest
+@ExtendWith(MockitoExtension.class)
+class ChatResourceTest {
+
+ private static final String ANSWER = "Hello! How can I assist you today?";
+
+ @Mock
+ private ChatLanguageModel chatLanguageModel;
+
+ @InjectMocks
+ private ChatResource chat;
+
+ @Test
+ void shouldSendMessage() {
+ when(chatLanguageModel.generate("Hello")).thenReturn(ANSWER);
+
+ assertThat(chat.send("Hello")).isEqualTo(ANSWER);
+ }
+}
diff --git a/src/main/resources/generator/server/springboot/mvc/security/jwt/basic-auth/main/infrastructure/primary/RestAuthenticationQuery.java.mustache b/src/main/resources/generator/server/springboot/mvc/security/jwt/basic-auth/main/infrastructure/primary/RestAuthenticationQuery.java.mustache
index acc87a63b62..0b86778f048 100644
--- a/src/main/resources/generator/server/springboot/mvc/security/jwt/basic-auth/main/infrastructure/primary/RestAuthenticationQuery.java.mustache
+++ b/src/main/resources/generator/server/springboot/mvc/security/jwt/basic-auth/main/infrastructure/primary/RestAuthenticationQuery.java.mustache
@@ -13,7 +13,7 @@ import {{packageName}}.account.infrastructure.primary.RestAuthenticationQuery.Re
import {{packageName}}.shared.authentication.domain.Roles;
@JsonDeserialize(builder = RestAuthenticationQueryBuilder.class)
-@Schema(name = "AuthenticationQuery", description = "Query to authenticate au user")
+@Schema(name = "AuthenticationQuery", description = "Query to authenticate a user")
final class RestAuthenticationQuery {
private final String username;
diff --git a/src/main/resources/generator/server/springboot/mvc/security/oauth2/core/docker/jhipster-realm.json.mustache b/src/main/resources/generator/server/springboot/mvc/security/oauth2/core/docker/jhipster-realm.json.mustache
index a74ae77ffca..226b81e74b5 100644
--- a/src/main/resources/generator/server/springboot/mvc/security/oauth2/core/docker/jhipster-realm.json.mustache
+++ b/src/main/resources/generator/server/springboot/mvc/security/oauth2/core/docker/jhipster-realm.json.mustache
@@ -1807,7 +1807,7 @@
{
"id": "da7d3a39-7077-4354-9ffc-5b9f79fbaf0d",
"alias": "Verify Existing Account by Re-authentication",
- "description": "Reauthentication of existing account",
+ "description": "Re-authentication of existing account",
"providerId": "basic-flow",
"topLevel": false,
"builtIn": true,
diff --git a/src/main/resources/messages/assertions-errors/assertion-errors-messages.properties b/src/main/resources/messages/assertions-errors/assertion-errors-messages.properties
index af994cff457..bdf719eb6d7 100644
--- a/src/main/resources/messages/assertions-errors/assertion-errors-messages.properties
+++ b/src/main/resources/messages/assertions-errors/assertion-errors-messages.properties
@@ -28,7 +28,7 @@ assertion-error.STRING_TOO_SHORT.title=String too short
assertion-error.STRING_WITH_WHITESPACES.detail=The string {{ field }} must not have any whitespaces
assertion-error.STRING_WITH_WHITESPACES.title=String with whitespaces
-assertion-error.TOO_MANY_ELEMENTS.detail=There is too many elements in {{ field }}, max is {{ maxSize }} (current {{ currentSize }} element(s))
+assertion-error.TOO_MANY_ELEMENTS.detail=There are too many elements in {{ field }}, max is {{ maxSize }} (current {{ currentSize }} element(s))
assertion-error.TOO_MANY_ELEMENTS.title=Too many elements
assertion-error.STRING_NOT_MATCHING_PATTERN.detail=The string {{ field }} must match the pattern {{ pattern }}
diff --git a/src/main/resources/messages/errors/generator-errors-messages_fr.properties b/src/main/resources/messages/errors/generator-errors-messages_fr.properties
index fbebb5e1d38..f040c19435f 100644
--- a/src/main/resources/messages/errors/generator-errors-messages_fr.properties
+++ b/src/main/resources/messages/errors/generator-errors-messages_fr.properties
@@ -38,7 +38,7 @@ error.invalid-property-type.title=Type de propriété invalide
error.invalid-slug.detail=Slug invalide. Les slugs doivent être composés uniquement de lettres en minuscules, de nombres ou de tirets
error.invalid-slug.title=Slug invalide
-error.invalid-tag.detail=Nom du tag {{ tag }} invalide, les tag doivent être uniquement constitués de lettres minuscules, de nombres ou de tirets
+error.invalid-tag.detail=Nom du tag {{ tag }} invalide, les tags doivent être uniquement constitués de lettres minuscules, de nombres ou de tirets
error.invalid-tag.title=Tag invalide
error.invalid-toml-version-catalog-file.detail=Le fichier gradle/libs.versions.toml est invalide
diff --git a/src/main/webapp/app/module/primary/landscape-loader/LandscapeLoader.html b/src/main/webapp/app/module/primary/landscape-loader/LandscapeLoader.html
index c40c708c0c7..006c53360e7 100644
--- a/src/main/webapp/app/module/primary/landscape-loader/LandscapeLoader.html
+++ b/src/main/webapp/app/module/primary/landscape-loader/LandscapeLoader.html
@@ -1,4 +1,4 @@
-
+
diff --git a/src/main/webapp/app/module/primary/landscape-minimap/LandscapeMiniMap.component.ts b/src/main/webapp/app/module/primary/landscape-minimap/LandscapeMiniMap.component.ts
index a73ea1be2a0..fb038181c50 100644
--- a/src/main/webapp/app/module/primary/landscape-minimap/LandscapeMiniMap.component.ts
+++ b/src/main/webapp/app/module/primary/landscape-minimap/LandscapeMiniMap.component.ts
@@ -42,7 +42,7 @@ export default defineComponent({
});
const removeDataSelectorAttrs = (data: string): string => {
- const regex = /data-selector="[^"]*"/g;
+ const regex = /data-testid="[^"]*"/g;
return data.replace(regex, '');
};
diff --git a/src/main/webapp/app/module/primary/landscape-minimap/LandscapeMiniMap.html b/src/main/webapp/app/module/primary/landscape-minimap/LandscapeMiniMap.html
index c590d0b5bff..1df69fa96b5 100644
--- a/src/main/webapp/app/module/primary/landscape-minimap/LandscapeMiniMap.html
+++ b/src/main/webapp/app/module/primary/landscape-minimap/LandscapeMiniMap.html
@@ -1,13 +1,11 @@
-
+
@@ -19,8 +17,8 @@
@mousemove="grabbing"
@mouseup="stopGrabbing"
@mouseleave="stopGrabbing"
- data-selector="minimap-viewer"
+ data-testid="minimap-viewer"
>
-
+
diff --git a/src/main/webapp/app/module/primary/landscape-module/LandscapeModule.html b/src/main/webapp/app/module/primary/landscape-module/LandscapeModule.html
index 7c75b929063..2c034be2d93 100644
--- a/src/main/webapp/app/module/primary/landscape-module/LandscapeModule.html
+++ b/src/main/webapp/app/module/primary/landscape-module/LandscapeModule.html
@@ -2,7 +2,7 @@
class="jhlite-chip"
:class="moduleClass()"
:ref="el => landscapeElements.set(module.slugString(), el)"
- :data-selector="`${module.slugString()}-module`"
+ :data-testid="`${module.slugString()}-module`"
@mouseover="emphasizeModule()"
@mouseleave="deEmphasizeModule()"
@click="clickedModule()"
@@ -15,7 +15,7 @@
name="ccw"
aria-label="Reapply"
title="Re-apply module"
- :data-selector="`module-${module.slug}-application-icon`"
+ :data-testid="`module-${module.slug}-application-icon`"
/>
{{ module.operation() }}
diff --git a/src/main/webapp/app/module/primary/landscape-preset-configuration/LandscapePresetConfiguration.html b/src/main/webapp/app/module/primary/landscape-preset-configuration/LandscapePresetConfiguration.html
index 159c485cc1d..92910a23f1c 100644
--- a/src/main/webapp/app/module/primary/landscape-preset-configuration/LandscapePresetConfiguration.html
+++ b/src/main/webapp/app/module/primary/landscape-preset-configuration/LandscapePresetConfiguration.html
@@ -4,7 +4,7 @@
class="jhlite-button-main -small"
@click="openPresetConfiguration"
title="Show presets configurations"
- data-selector="show-preset-configuration-btn"
+ data-testid="show-preset-configuration-btn"
>
@@ -13,7 +13,7 @@
v-if="isPresetConfigurationOpen"
@click="closePresetConfiguration"
title="Hide presets configurations"
- data-selector="hide-preset-configuration-btn"
+ data-testid="hide-preset-configuration-btn"
>
diff --git a/src/main/webapp/app/module/primary/landscape/Landscape.html b/src/main/webapp/app/module/primary/landscape/Landscape.html
index b3cd7bcd310..7a26fd98163 100644
--- a/src/main/webapp/app/module/primary/landscape/Landscape.html
+++ b/src/main/webapp/app/module/primary/landscape/Landscape.html
@@ -1,5 +1,5 @@
-
+
@@ -7,7 +7,7 @@
class="jhlite-button-switch"
:class="modeSwitchClass('COMPACTED')"
@click="selectMode('COMPACTED')"
- data-selector="compacted-mode-button"
+ data-testid="compacted-mode-button"
>
Compacted
@@ -15,7 +15,7 @@
class="jhlite-button-switch"
:class="modeSwitchClass('EXTENDED')"
@click="selectMode('EXTENDED')"
- data-selector="extended-mode-button"
+ data-testid="extended-mode-button"
>
Extended
@@ -36,7 +36,7 @@
class="jhlite-input-text"
placeholder="Search modules..."
@input="performSearch($event.target.value)"
- data-selector="landscape-search-input"
+ data-testid="landscape-search-input"
/>
@@ -46,7 +46,7 @@
@@ -95,7 +95,7 @@
{{ element.sl