diff --git a/src/main/java/tech/jhipster/lite/generator/client/angular/admin/health/domain/AngularHealthModuleFactory.java b/src/main/java/tech/jhipster/lite/generator/client/angular/admin/health/domain/AngularHealthModuleFactory.java index 76c89df4165..4aca752b09b 100644 --- a/src/main/java/tech/jhipster/lite/generator/client/angular/admin/health/domain/AngularHealthModuleFactory.java +++ b/src/main/java/tech/jhipster/lite/generator/client/angular/admin/health/domain/AngularHealthModuleFactory.java @@ -23,7 +23,7 @@ public class AngularHealthModuleFactory { });\ """; - private static final String HEALTH_LINK = " Health"; + private static final String HEALTH_LINK = " Health"; private static final String ADMIN_ROUTING = """ diff --git a/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/admin-routing.module.ts.mustache b/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/admin-routing.module.ts.mustache index 4b96df5e8ca..631762c6b35 100644 --- a/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/admin-routing.module.ts.mustache +++ b/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/admin-routing.module.ts.mustache @@ -10,8 +10,6 @@ export const routes: Routes = [ ]; @NgModule({ - imports: [ - RouterModule.forChild(routes), - ], + imports: [RouterModule.forChild(routes)], }) export default class AdminRoutingModule {} diff --git a/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/health/health.component.css.mustache b/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/health/health.component.css.mustache index 7b94fa80d5f..52694fdb4ba 100644 --- a/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/health/health.component.css.mustache +++ b/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/health/health.component.css.mustache @@ -1,4 +1,5 @@ -table, h2 { +table, +h2 { width: 90%; margin-left: auto; margin-right: auto; diff --git a/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/health/health.component.html.mustache b/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/health/health.component.html.mustache index 133aa31be2d..c1721e0500c 100644 --- a/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/health/health.component.html.mustache +++ b/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/health/health.component.html.mustache @@ -1,13 +1,10 @@

Diagnostics - +

- @@ -21,16 +18,15 @@ - +
Service name {{ element.key }}Details - @if (element.details) { - - } + @if (element.details) { + + }
-
diff --git a/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/health/health.component.spec.ts.mustache b/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/health/health.component.spec.ts.mustache index 72ef12c6eab..395831cdf13 100644 --- a/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/health/health.component.spec.ts.mustache +++ b/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/health/health.component.spec.ts.mustache @@ -42,9 +42,11 @@ describe('HealthComponent', () => { // THEN expect(service.checkHealth).toHaveBeenCalled(); - expect(service.checkHealth().subscribe({ - next: () => expect(comp.datasource).toEqual([{"details": {"mailDetail": "mail"}, "key": "mail", "status": "UP"}]), - })); + expect( + service.checkHealth().subscribe({ + next: () => expect(comp.datasource).toEqual([{ details: { mailDetail: 'mail' }, key: 'mail', status: 'UP' }]), + }), + ); }); it('should call checkHealth on refresh', done => { @@ -66,8 +68,8 @@ describe('HealthComponent', () => { // GIVEN const health: Health = { status: 'UP', - components: null - } + components: null, + }; // WHEN comp.showHealth(health); @@ -95,5 +97,4 @@ describe('HealthComponent', () => { expect(downBadgeClass).toEqual('bg-danger'); }); }); - }); diff --git a/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/health/modal/health-modal.component.html.mustache b/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/health/modal/health-modal.component.html.mustache index 7b1ccad6a7c..73e34cc9250 100644 --- a/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/health/modal/health-modal.component.html.mustache +++ b/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/health/modal/health-modal.component.html.mustache @@ -1,25 +1,22 @@ -

Properties

-@if (healthDetails) { - - - - - - - - - - - + @if (healthDetails) { +
Name{{ element.key }}Value{{ readableValue(element.value) }}
+ + + + - - -
Name{{ element.key }}
-} + + Value + {{ readableValue(element.value) }} + + + + + }
diff --git a/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/health/modal/health-modal.component.spec.ts.mustache b/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/health/modal/health-modal.component.spec.ts.mustache index 6cbec55901a..1b014e6f6e3 100644 --- a/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/health/modal/health-modal.component.spec.ts.mustache +++ b/src/main/resources/generator/client/angular/admin/src/main/webapp/app/admin/health/modal/health-modal.component.spec.ts.mustache @@ -7,8 +7,8 @@ import { HealthModalComponent } from './health-modal.component'; class MatDialogMock { open() { return { - afterClosed: () => of(true) - } + afterClosed: () => of(true), + }; } } @@ -18,9 +18,7 @@ describe('HealthModalComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - providers: [ - { provide: MAT_DIALOG_DATA, useValue: MatDialogMock } - ] + providers: [{ provide: MAT_DIALOG_DATA, useValue: MatDialogMock }], }) .overrideTemplate(HealthModalComponent, '') .compileComponents(); diff --git a/src/main/resources/generator/server/pagination/domain/test/AppPageTest.java.mustache b/src/main/resources/generator/server/pagination/domain/test/AppPageTest.java.mustache index 68843dfb263..d2991309b43 100644 --- a/src/main/resources/generator/server/pagination/domain/test/AppPageTest.java.mustache +++ b/src/main/resources/generator/server/pagination/domain/test/AppPageTest.java.mustache @@ -95,7 +95,11 @@ class {{baseName}}PageTest { @Test void shouldBeLastPageWithoutContent() { - {{baseName}}Page page = {{baseName}}Page.builder(List.of()).currentPage(0).pageSize(1).totalElementsCount(0).build(); + {{baseName}}Page page = {{baseName}}Page.builder(List.of()) + .currentPage(0) + .pageSize(1) + .totalElementsCount(0) + .build(); assertThat(page.isNotLast()).isFalse(); } @@ -106,7 +110,10 @@ class {{baseName}}PageTest { @Test void shouldGetPageFromElements() { - {{baseName}}Page page = {{baseName}}Page.of(List.of("hello", "java", "world"), new {{baseName}}Pageable(1, 1)); + {{baseName}}Page page = {{baseName}}Page.of( + List.of("hello", "java", "world"), + new {{baseName}}Pageable(1, 1) + ); assertThat(page.currentPage()).isEqualTo(1); assertThat(page.hasNext()).isTrue(); @@ -118,7 +125,10 @@ class {{baseName}}PageTest { @Test void shouldGetEmptyPageFromOutOfBoundElements() { - {{baseName}}Page page = {{baseName}}Page.of(List.of("hello", "java", "world"), new {{baseName}}Pageable(4, 1)); + {{baseName}}Page page = {{baseName}}Page.of( + List.of("hello", "java", "world"), + new {{baseName}}Pageable(4, 1) + ); assertThat(page.currentPage()).isEqualTo(4); assertThat(page.hasNext()).isFalse(); @@ -130,7 +140,10 @@ class {{baseName}}PageTest { @Test void shouldGetPageWithLessThanExpectedElements() { - {{baseName}}Page page = {{baseName}}Page.of(List.of("hello", "java", "world"), new {{baseName}}Pageable(0, 4)); + {{baseName}}Page page = {{baseName}}Page.of( + List.of("hello", "java", "world"), + new {{baseName}}Pageable(0, 4) + ); assertThat(page.currentPage()).isZero(); assertThat(page.hasNext()).isFalse(); diff --git a/src/main/resources/generator/server/pagination/rest/test/RestAppPageTest.java.mustache b/src/main/resources/generator/server/pagination/rest/test/RestAppPageTest.java.mustache index b15f03edd51..0e50b1f5523 100644 --- a/src/main/resources/generator/server/pagination/rest/test/RestAppPageTest.java.mustache +++ b/src/main/resources/generator/server/pagination/rest/test/RestAppPageTest.java.mustache @@ -14,12 +14,16 @@ class Rest{{baseName}}PageTest { @Test void shouldNotConvertWithoutSourcePage() { - assertThatThrownBy(() -> Rest{{baseName}}Page.from(null, source -> "test")).isExactlyInstanceOf(MissingMandatoryValueException.class); + assertThatThrownBy(() -> Rest{{baseName}}Page.from(null, source -> "test")).isExactlyInstanceOf( + MissingMandatoryValueException.class + ); } @Test void shouldNotConvertWithoutMappingFunction() { - assertThatThrownBy(() -> Rest{{baseName}}Page.from(page(), null)).isExactlyInstanceOf(MissingMandatoryValueException.class); + assertThatThrownBy(() -> Rest{{baseName}}Page.from(page(), null)).isExactlyInstanceOf( + MissingMandatoryValueException.class + ); } @Test @@ -35,7 +39,10 @@ class Rest{{baseName}}PageTest { @Test void shouldGetPageCountForPageLimit() { - Rest{{baseName}}Page page = Rest{{baseName}}Page.from(pageBuilder().totalElementsCount(3).pageSize(3).build(), Function.identity()); + Rest{{baseName}}Page page = Rest{{baseName}}Page.from( + pageBuilder().totalElementsCount(3).pageSize(3).build(), + Function.identity() + ); assertThat(page.getPagesCount()).isEqualTo(1); } diff --git a/src/main/resources/generator/server/springboot/cucumber/CucumberConfiguration.java.mustache b/src/main/resources/generator/server/springboot/cucumber/CucumberConfiguration.java.mustache index 904e74d8e0a..cef873eaf16 100644 --- a/src/main/resources/generator/server/springboot/cucumber/CucumberConfiguration.java.mustache +++ b/src/main/resources/generator/server/springboot/cucumber/CucumberConfiguration.java.mustache @@ -24,7 +24,10 @@ import {{packageName}}.cucumber.rest.CucumberRestTestContext; @ActiveProfiles("test") @CucumberContextConfiguration -@SpringBootTest(classes = { {{ baseName }}App.class, CucumberRestTemplateConfiguration.class }, webEnvironment = WebEnvironment.RANDOM_PORT) +@SpringBootTest( + classes = { {{ baseName }}App.class, CucumberRestTemplateConfiguration.class }, + webEnvironment = WebEnvironment.RANDOM_PORT +) public class CucumberConfiguration { private final TestRestTemplate rest; diff --git a/src/main/resources/generator/server/springboot/mvc/sample/feature/main/infrastructure/secondary/InMemoryBeersRepository.java.mustache b/src/main/resources/generator/server/springboot/mvc/sample/feature/main/infrastructure/secondary/InMemoryBeersRepository.java.mustache index a606fbff07a..a05d2dad78e 100644 --- a/src/main/resources/generator/server/springboot/mvc/sample/feature/main/infrastructure/secondary/InMemoryBeersRepository.java.mustache +++ b/src/main/resources/generator/server/springboot/mvc/sample/feature/main/infrastructure/secondary/InMemoryBeersRepository.java.mustache @@ -6,7 +6,6 @@ import {{packageName}}.sample.domain.beer.BeerSellingState; import {{packageName}}.sample.domain.beer.Beers; import {{packageName}}.sample.domain.beer.BeersRepository; import {{packageName}}.shared.error.domain.Assert; - import java.util.Map; import java.util.Optional; import java.util.concurrent.ConcurrentHashMap; diff --git a/src/main/resources/generator/server/springboot/mvc/security/kipe/authorization/test/ApplicationAuthorizationsTest.java.mustache b/src/main/resources/generator/server/springboot/mvc/security/kipe/authorization/test/ApplicationAuthorizationsTest.java.mustache index 0d5020d4ce0..cf9044e7935 100644 --- a/src/main/resources/generator/server/springboot/mvc/security/kipe/authorization/test/ApplicationAuthorizationsTest.java.mustache +++ b/src/main/resources/generator/server/springboot/mvc/security/kipe/authorization/test/ApplicationAuthorizationsTest.java.mustache @@ -24,7 +24,9 @@ import {{packageName}}.shared.kipe.domain.RolesAccessesFixture.TestResource; @UnitTest class {{ baseName }}AuthorizationsTest { - private static final {{ baseName }}Authorizations authorizations = new {{ baseName }}Authorizations(List.of(rolesAccesses())); + private static final {{ baseName }}Authorizations authorizations = new {{ baseName }}Authorizations( + List.of(rolesAccesses()) + ); @Nested @DisplayName("All authorized") diff --git a/src/main/resources/generator/server/springboot/thymeleaf/template/documentation/thymeleaf.md.mustache b/src/main/resources/generator/server/springboot/thymeleaf/template/documentation/thymeleaf.md.mustache index 234b843cb54..5650f75dce3 100644 --- a/src/main/resources/generator/server/springboot/thymeleaf/template/documentation/thymeleaf.md.mustache +++ b/src/main/resources/generator/server/springboot/thymeleaf/template/documentation/thymeleaf.md.mustache @@ -2,15 +2,15 @@ ### Reference Documentation -* [Thymeleaf](https://www.thymeleaf.org) +- [Thymeleaf](https://www.thymeleaf.org) ### Guides The following guides illustrate how to use some features concretely: -* [Handling Form Submission](https://spring.io/guides/gs/handling-form-submission/) -* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/) -* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/) -* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/) +- [Handling Form Submission](https://spring.io/guides/gs/handling-form-submission/) +- [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/) +- [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/) +- [Building REST services with Spring](https://spring.io/guides/tutorials/rest/) # Live reload setup diff --git a/src/main/resources/generator/server/springboot/thymeleaf/template/src/main/resources/templates/index.html.mustache b/src/main/resources/generator/server/springboot/thymeleaf/template/src/main/resources/templates/index.html.mustache index b7e3c08c979..e8a9f79ff62 100644 --- a/src/main/resources/generator/server/springboot/thymeleaf/template/src/main/resources/templates/index.html.mustache +++ b/src/main/resources/generator/server/springboot/thymeleaf/template/src/main/resources/templates/index.html.mustache @@ -1,4 +1,4 @@ - + + diff --git a/src/test/resources/projects/thymeleaf/index.html.template b/src/test/resources/projects/thymeleaf/index.html.template index b7e3c08c979..e8a9f79ff62 100644 --- a/src/test/resources/projects/thymeleaf/index.html.template +++ b/src/test/resources/projects/thymeleaf/index.html.template @@ -1,4 +1,4 @@ - +