Skip to content

Commit

Permalink
automatic project update for v8.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
deepu105 committed Nov 2, 2023
1 parent 521d095 commit 4ed46a2
Show file tree
Hide file tree
Showing 32 changed files with 303 additions and 168 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// maven and gradle wrappers are used by default, we don't need them installed globally
// "INSTALL_MAVEN": "true",
// "INSTALL_GRADLE": "false",
"NODE_VERSION": "18.18.1"
"NODE_VERSION": "18.18.2"
}
},

Expand Down
3 changes: 3 additions & 0 deletions .lintstagedrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
'{,**/}*.{md,json,yml,html,cjs,mjs,js,ts,tsx,css,scss,java}': ['prettier --write'],
};
3 changes: 0 additions & 3 deletions .lintstagedrc.js

This file was deleted.

50 changes: 25 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,18 @@
"packaging": "jar"
},
"dependencies": {
"@angular/common": "16.2.9",
"@angular/compiler": "16.2.9",
"@angular/core": "16.2.9",
"@angular/forms": "16.2.9",
"@angular/localize": "16.2.9",
"@angular/platform-browser": "16.2.9",
"@angular/platform-browser-dynamic": "16.2.9",
"@angular/router": "16.2.9",
"@angular/common": "16.2.11",
"@angular/compiler": "16.2.11",
"@angular/core": "16.2.11",
"@angular/forms": "16.2.11",
"@angular/localize": "16.2.11",
"@angular/platform-browser": "16.2.11",
"@angular/platform-browser-dynamic": "16.2.11",
"@angular/router": "16.2.11",
"@fortawesome/angular-fontawesome": "0.13.0",
"@fortawesome/fontawesome-svg-core": "6.4.2",
"@fortawesome/free-solid-svg-icons": "6.4.2",
"@ng-bootstrap/ng-bootstrap": "15.1.1",
"@ng-bootstrap/ng-bootstrap": "15.1.2",
"@ngx-translate/core": "15.0.0",
"@ngx-translate/http-loader": "8.0.0",
"@popperjs/core": "2.11.8",
Expand All @@ -108,23 +108,23 @@
"devDependencies": {
"@angular-builders/custom-webpack": "16.0.1",
"@angular-builders/jest": "16.0.1",
"@angular-devkit/build-angular": "16.2.6",
"@angular-devkit/build-angular": "16.2.9",
"@angular-eslint/eslint-plugin": "16.2.0",
"@angular/cli": "16.2.6",
"@angular/compiler-cli": "16.2.9",
"@angular/service-worker": "16.2.9",
"@types/jest": "29.5.5",
"@types/node": "18.18.5",
"@typescript-eslint/eslint-plugin": "6.7.5",
"@typescript-eslint/parser": "6.7.5",
"@angular/cli": "16.2.9",
"@angular/compiler-cli": "16.2.11",
"@angular/service-worker": "16.2.11",
"@types/jest": "29.5.7",
"@types/node": "18.18.8",
"@typescript-eslint/eslint-plugin": "6.9.1",
"@typescript-eslint/parser": "6.9.1",
"browser-sync": "2.29.3",
"browser-sync-webpack-plugin": "2.3.0",
"buffer": "6.0.3",
"concurrently": "8.2.1",
"concurrently": "8.2.2",
"copy-webpack-plugin": "11.0.0",
"cypress": "13.3.1",
"cypress": "13.4.0",
"cypress-audit": "1.1.0",
"eslint": "8.51.0",
"eslint": "8.52.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-cypress": "2.15.1",
"eslint-webpack-plugin": "4.0.1",
Expand All @@ -138,27 +138,27 @@
"jest-preset-angular": "13.1.2",
"jest-sonar": "0.2.16",
"lighthouse": "11.2.0",
"lint-staged": "14.0.1",
"lint-staged": "15.0.2",
"merge-jsons-webpack-plugin": "2.0.1",
"prettier": "3.0.3",
"prettier-plugin-java": "2.3.1",
"prettier-plugin-packagejson": "2.4.6",
"rimraf": "5.0.5",
"swagger-ui-dist": "5.9.0",
"swagger-ui-dist": "5.9.1",
"ts-jest": "29.1.1",
"typescript": "5.1.6",
"wait-on": "7.0.1",
"webpack-bundle-analyzer": "4.9.1",
"webpack-merge": "5.9.0",
"webpack-merge": "5.10.0",
"webpack-notifier": "1.15.0"
},
"engines": {
"node": ">=18.18.1"
"node": ">=18.18.2"
},
"cacheDirectories": [
"node_modules"
],
"overrides": {
"webpack": "5.88.2"
"webpack": "5.89.0"
}
}
37 changes: 15 additions & 22 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
-->
<maven.version>3.2.5</maven.version>
<java.version>17</java.version>
<node.version>v18.18.1</node.version>
<npm.version>10.2.0</npm.version>
<node.version>v18.18.2</node.version>
<npm.version>10.2.2</npm.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
Expand All @@ -28,19 +28,19 @@
<argLine>-Djava.security.egd=file:/dev/./urandom -Xmx1G</argLine>
<m2e.apt.activation>jdt_apt</m2e.apt.activation>
<run.addResources>false</run.addResources>
<jhipster-dependencies.version>8.0.0-rc.1</jhipster-dependencies.version>
<spring-boot.version>3.1.4</spring-boot.version>
<jhipster-dependencies.version>8.0.0</jhipster-dependencies.version>
<spring-boot.version>3.1.5</spring-boot.version>
<archunit-junit5.version>1.1.0</archunit-junit5.version>
<checkstyle.version>10.12.4</checkstyle.version>
<checksum-maven-plugin.version>1.11</checksum-maven-plugin.version>
<frontend-maven-plugin.version>1.14.0</frontend-maven-plugin.version>
<frontend-maven-plugin.version>1.14.2</frontend-maven-plugin.version>
<gatling-maven-plugin.version>4.6.0</gatling-maven-plugin.version>
<gatling.version>3.9.5</gatling.version>
<git-commit-id-maven-plugin.version>6.0.0</git-commit-id-maven-plugin.version>
<git-commit-id-maven-plugin.version>7.0.0</git-commit-id-maven-plugin.version>
<h2.version>2.2.224</h2.version>
<hibernate.version>6.2.9.Final</hibernate.version>
<jacoco-maven-plugin.version>0.8.10</jacoco-maven-plugin.version>
<jaxb-runtime.version>4.0.3</jaxb-runtime.version>
<hibernate.version>6.2.13.Final</hibernate.version>
<jacoco-maven-plugin.version>0.8.11</jacoco-maven-plugin.version>
<jaxb-runtime.version>4.0.4</jaxb-runtime.version>
<jib-maven-plugin.architecture>amd64</jib-maven-plugin.architecture>
<jib-maven-plugin.image>eclipse-temurin:17-jre-focal</jib-maven-plugin.image>
<jib-maven-plugin.version>3.4.0</jib-maven-plugin.version>
Expand All @@ -53,18 +53,18 @@
<liquibase.version>4.24.0</liquibase.version>
<mapstruct.version>1.5.5.Final</mapstruct.version>
<maven-antrun-plugin.version>3.1.0</maven-antrun-plugin.version>
<maven-checkstyle-plugin.version>3.3.0</maven-checkstyle-plugin.version>
<maven-clean-plugin.version>3.3.1</maven-clean-plugin.version>
<maven-checkstyle-plugin.version>3.3.1</maven-checkstyle-plugin.version>
<maven-clean-plugin.version>3.3.2</maven-clean-plugin.version>
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
<maven-eclipse-plugin.version>2.1</maven-eclipse-plugin.version>
<maven-enforcer-plugin.version>3.4.1</maven-enforcer-plugin.version>
<maven-failsafe-plugin.version>3.1.2</maven-failsafe-plugin.version>
<maven-failsafe-plugin.version>3.2.1</maven-failsafe-plugin.version>
<maven-idea-plugin.version>2.2.1</maven-idea-plugin.version>
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
<maven-javadoc-plugin.version>3.6.0</maven-javadoc-plugin.version>
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
<maven-site-plugin.version>3.12.1</maven-site-plugin.version>
<maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
<maven-surefire-plugin.version>3.2.1</maven-surefire-plugin.version>
<maven-war-plugin.version>3.4.0</maven-war-plugin.version>
<modernizer-maven-plugin.version>2.7.0</modernizer-maven-plugin.version>
<nohttp-checkstyle.version>0.0.11</nohttp-checkstyle.version>
Expand All @@ -73,7 +73,7 @@
<profile.no-liquibase/>
<profile.test/>
<profile.tls/>
<properties-maven-plugin.version>1.2.0</properties-maven-plugin.version>
<properties-maven-plugin.version>1.2.1</properties-maven-plugin.version>
<sonar-maven-plugin.version>3.10.0.2594</sonar-maven-plugin.version>
<spotless-maven-plugin.version>2.40.0</spotless-maven-plugin.version>
<validation-api.version>3.0.2</validation-api.version>
Expand Down Expand Up @@ -647,7 +647,7 @@
<version>${maven-resources-plugin.version}</version>
<executions>
<execution>
<id>default-resources</id>
<id>config-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
Expand All @@ -666,13 +666,6 @@
<include>config/*.yml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources/</directory>
<filtering>false</filtering>
<excludes>
<exclude>config/*.yml</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
Expand Down
2 changes: 1 addition & 1 deletion src/main/docker/monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
# grafana/provisioning/datasources/datasource.yml
network_mode: 'host' # to test locally running service
grafana:
image: grafana/grafana:10.1.5
image: grafana/grafana:10.2.0
volumes:
- ./grafana/provisioning/:/etc/grafana/provisioning/
environment:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.github.jhipster.sample.config;

import com.fasterxml.jackson.datatype.hibernate6.Hibernate6Module;
import com.fasterxml.jackson.datatype.hibernate6.Hibernate6Module.Feature;
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import org.springframework.context.annotation.Bean;
Expand Down Expand Up @@ -28,6 +29,6 @@ public Jdk8Module jdk8TimeModule() {
*/
@Bean
public Hibernate6Module hibernate6Module() {
return new Hibernate6Module();
return new Hibernate6Module().configure(Feature.SERIALIZE_IDENTIFIER_FOR_LAZY_NOT_LOADED_OBJECTS, true);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public SecurityFilterChain filterChain(HttpSecurity http, MvcRequestMatcher.Buil
.authorizeHttpRequests(authz ->
// prettier-ignore
authz
.requestMatchers(mvc.pattern("/index.html"), mvc.pattern("/*.js"), mvc.pattern("/*.map"), mvc.pattern("/*.css")).permitAll()
.requestMatchers(mvc.pattern("/index.html"), mvc.pattern("/*.js"), mvc.pattern("/*.txt"), mvc.pattern("/*.json"), mvc.pattern("/*.map"), mvc.pattern("/*.css")).permitAll()
.requestMatchers(mvc.pattern("/*.ico"), mvc.pattern("/*.png"), mvc.pattern("/*.svg"), mvc.pattern("/*.webapp")).permitAll()
.requestMatchers(mvc.pattern("/app/**")).permitAll()
.requestMatchers(mvc.pattern("/i18n/**")).permitAll()
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/io/github/jhipster/sample/domain/Operation.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,11 @@ public Operation labels(Set<Label> labels) {

public Operation addLabel(Label label) {
this.labels.add(label);
label.getOperations().add(this);
return this;
}

public Operation removeLabel(Label label) {
this.labels.remove(label);
label.getOperations().remove(this);
return this;
}

Expand Down
14 changes: 10 additions & 4 deletions src/main/java/io/github/jhipster/sample/service/MailService.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
import java.util.Locale;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Lazy;
import org.springframework.mail.MailException;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mail.javamail.MimeMessageHelper;
Expand Down Expand Up @@ -39,6 +41,10 @@ public class MailService {

private final SpringTemplateEngine templateEngine;

@Autowired
@Lazy
private MailService self;

public MailService(
JHipsterProperties jHipsterProperties,
JavaMailSender javaMailSender,
Expand Down Expand Up @@ -89,24 +95,24 @@ public void sendEmailFromTemplate(User user, String templateName, String titleKe
context.setVariable(BASE_URL, jHipsterProperties.getMail().getBaseUrl());
String content = templateEngine.process(templateName, context);
String subject = messageSource.getMessage(titleKey, null, locale);
sendEmail(user.getEmail(), subject, content, false, true);
self.sendEmail(user.getEmail(), subject, content, false, true);
}

@Async
public void sendActivationEmail(User user) {
log.debug("Sending activation email to '{}'", user.getEmail());
sendEmailFromTemplate(user, "mail/activationEmail", "email.activation.title");
self.sendEmailFromTemplate(user, "mail/activationEmail", "email.activation.title");
}

@Async
public void sendCreationEmail(User user) {
log.debug("Sending creation email to '{}'", user.getEmail());
sendEmailFromTemplate(user, "mail/creationEmail", "email.activation.title");
self.sendEmailFromTemplate(user, "mail/creationEmail", "email.activation.title");
}

@Async
public void sendPasswordResetMail(User user) {
log.debug("Sending password reset email to '{}'", user.getEmail());
sendEmailFromTemplate(user, "mail/passwordResetEmail", "email.reset.title");
self.sendEmailFromTemplate(user, "mail/passwordResetEmail", "email.reset.title");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* REST controller for managing {@link io.github.jhipster.sample.domain.BankAccount}.
*/
@RestController
@RequestMapping("/api")
@RequestMapping("/api/bank-accounts")
@Transactional
public class BankAccountResource {

Expand All @@ -47,7 +47,7 @@ public BankAccountResource(BankAccountRepository bankAccountRepository) {
* @return the {@link ResponseEntity} with status {@code 201 (Created)} and with body the new bankAccount, or with status {@code 400 (Bad Request)} if the bankAccount has already an ID.
* @throws URISyntaxException if the Location URI syntax is incorrect.
*/
@PostMapping("/bank-accounts")
@PostMapping("")
public ResponseEntity<BankAccount> createBankAccount(@Valid @RequestBody BankAccount bankAccount) throws URISyntaxException {
log.debug("REST request to save BankAccount : {}", bankAccount);
if (bankAccount.getId() != null) {
Expand All @@ -70,7 +70,7 @@ public ResponseEntity<BankAccount> createBankAccount(@Valid @RequestBody BankAcc
* or with status {@code 500 (Internal Server Error)} if the bankAccount couldn't be updated.
* @throws URISyntaxException if the Location URI syntax is incorrect.
*/
@PutMapping("/bank-accounts/{id}")
@PutMapping("/{id}")
public ResponseEntity<BankAccount> updateBankAccount(
@PathVariable(value = "id", required = false) final Long id,
@Valid @RequestBody BankAccount bankAccount
Expand Down Expand Up @@ -105,7 +105,7 @@ public ResponseEntity<BankAccount> updateBankAccount(
* or with status {@code 500 (Internal Server Error)} if the bankAccount couldn't be updated.
* @throws URISyntaxException if the Location URI syntax is incorrect.
*/
@PatchMapping(value = "/bank-accounts/{id}", consumes = { "application/json", "application/merge-patch+json" })
@PatchMapping(value = "/{id}", consumes = { "application/json", "application/merge-patch+json" })
public ResponseEntity<BankAccount> partialUpdateBankAccount(
@PathVariable(value = "id", required = false) final Long id,
@NotNull @RequestBody BankAccount bankAccount
Expand Down Expand Up @@ -148,8 +148,8 @@ public ResponseEntity<BankAccount> partialUpdateBankAccount(
* @param eagerload flag to eager load entities from relationships (This is applicable for many-to-many).
* @return the {@link ResponseEntity} with status {@code 200 (OK)} and the list of bankAccounts in body.
*/
@GetMapping("/bank-accounts")
public List<BankAccount> getAllBankAccounts(@RequestParam(required = false, defaultValue = "false") boolean eagerload) {
@GetMapping("")
public List<BankAccount> getAllBankAccounts(@RequestParam(required = false, defaultValue = "true") boolean eagerload) {
log.debug("REST request to get all BankAccounts");
if (eagerload) {
return bankAccountRepository.findAllWithEagerRelationships();
Expand All @@ -164,7 +164,7 @@ public List<BankAccount> getAllBankAccounts(@RequestParam(required = false, defa
* @param id the id of the bankAccount to retrieve.
* @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the bankAccount, or with status {@code 404 (Not Found)}.
*/
@GetMapping("/bank-accounts/{id}")
@GetMapping("/{id}")
public ResponseEntity<BankAccount> getBankAccount(@PathVariable Long id) {
log.debug("REST request to get BankAccount : {}", id);
Optional<BankAccount> bankAccount = bankAccountRepository.findOneWithEagerRelationships(id);
Expand All @@ -177,7 +177,7 @@ public ResponseEntity<BankAccount> getBankAccount(@PathVariable Long id) {
* @param id the id of the bankAccount to delete.
* @return the {@link ResponseEntity} with status {@code 204 (NO_CONTENT)}.
*/
@DeleteMapping("/bank-accounts/{id}")
@DeleteMapping("/{id}")
public ResponseEntity<Void> deleteBankAccount(@PathVariable Long id) {
log.debug("REST request to delete BankAccount : {}", id);
bankAccountRepository.deleteById(id);
Expand Down
Loading

0 comments on commit 4ed46a2

Please sign in to comment.