/src/main/webapp/app/**/@(*.)@(spec.ts)'],
25 | testEnvironmentOptions: {
26 | url: 'https://jhipster.tech',
27 | },
28 | };
29 |
--------------------------------------------------------------------------------
/ngsw-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@angular/service-worker/config/schema.json",
3 | "index": "/index.html",
4 | "assetGroups": [
5 | {
6 | "name": "app",
7 | "installMode": "prefetch",
8 | "resources": {
9 | "files": ["/favicon.ico", "/index.html", "/manifest.webapp", "/*.css", "/*.js"]
10 | }
11 | },
12 | {
13 | "name": "assets",
14 | "installMode": "lazy",
15 | "updateMode": "prefetch",
16 | "resources": {
17 | "files": ["/content/**", "/*.(eot|svg|cur|jpg|png|webp|gif|otf|ttf|woff|woff2|ani)"]
18 | }
19 | }
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/npmw:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | basedir=$(dirname "$0")
4 |
5 | if [ -f "$basedir/mvnw" ]; then
6 | bindir="$basedir/target/node"
7 | repodir="$basedir/target/node/node_modules"
8 | installCommand="$basedir/mvnw --batch-mode -ntp -Pwebapp frontend:install-node-and-npm@install-node-and-npm"
9 | else
10 | echo "Using npm installed globally"
11 | exec npm "$@"
12 | fi
13 |
14 | NPM_EXE="$repodir/npm/bin/npm-cli.js"
15 | NODE_EXE="$bindir/node"
16 |
17 | if [ ! -x "$NPM_EXE" ] || [ ! -x "$NODE_EXE" ]; then
18 | $installCommand || true
19 | fi
20 |
21 | if [ -x "$NODE_EXE" ]; then
22 | echo "Using node installed locally $($NODE_EXE --version)"
23 | PATH="$bindir:$PATH"
24 | else
25 | NODE_EXE='node'
26 | fi
27 |
28 | if [ ! -x "$NPM_EXE" ]; then
29 | echo "Local npm not found, using npm installed globally"
30 | npm "$@"
31 | else
32 | echo "Using npm installed locally $($NODE_EXE $NPM_EXE --version)"
33 | $NODE_EXE $NPM_EXE "$@"
34 | fi
35 |
--------------------------------------------------------------------------------
/npmw.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | setlocal
4 |
5 | set NPMW_DIR=%~dp0
6 |
7 | set NODE_EXE=^"^"
8 | set NODE_PATH=%NPMW_DIR%target\node\
9 | set NPM_EXE=^"%NPMW_DIR%target\node\npm.cmd^"
10 | set INSTALL_NPM_COMMAND=^"%NPMW_DIR%mvnw.cmd^" -Pwebapp frontend:install-node-and-npm@install-node-and-npm
11 |
12 | if not exist %NPM_EXE% (
13 | call %INSTALL_NPM_COMMAND%
14 | )
15 |
16 | if exist %NODE_EXE% (
17 | Rem execute local npm with local node, whilst adding local node location to the PATH for this CMD session
18 | endlocal & echo "%PATH%"|find /i "%NODE_PATH%;">nul || set "PATH=%NODE_PATH%;%PATH%" & call %NODE_EXE% %NPM_EXE% %*
19 | ) else if exist %NPM_EXE% (
20 | Rem execute local npm, whilst adding local npm location to the PATH for this CMD session
21 | endlocal & echo "%PATH%"|find /i "%NODE_PATH%;">nul || set "PATH=%NODE_PATH%;%PATH%" & call %NPM_EXE% %*
22 | ) else (
23 | call npm %*
24 | )
25 |
--------------------------------------------------------------------------------
/src/main/docker/app.yml:
--------------------------------------------------------------------------------
1 | # This configuration is intended for development purpose, it's **your** responsibility to harden it for production
2 | name: jhipsterdtosampleapplication
3 | services:
4 | app:
5 | image: jhipsterdtosampleapplication
6 | environment:
7 | - _JAVA_OPTIONS=-Xmx512m -Xms256m
8 | - SPRING_PROFILES_ACTIVE=prod,api-docs
9 | - MANAGEMENT_PROMETHEUS_METRICS_EXPORT_ENABLED=true
10 | - SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/jhipsterdtosampleapplication?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true
11 | - SPRING_LIQUIBASE_URL=jdbc:mysql://mysql:3306/jhipsterdtosampleapplication?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true
12 | ports:
13 | - 127.0.0.1:8080:8080
14 | healthcheck:
15 | test:
16 | - CMD
17 | - curl
18 | - -f
19 | - http://localhost:8080/management/health
20 | interval: 5s
21 | timeout: 5s
22 | retries: 40
23 | depends_on:
24 | mysql:
25 | condition: service_healthy
26 | mysql:
27 | extends:
28 | file: ./mysql.yml
29 | service: mysql
30 |
--------------------------------------------------------------------------------
/src/main/docker/grafana/provisioning/dashboards/dashboard.yml:
--------------------------------------------------------------------------------
1 | apiVersion: 1
2 |
3 | providers:
4 | - name: 'Prometheus'
5 | orgId: 1
6 | folder: ''
7 | type: file
8 | disableDeletion: false
9 | editable: true
10 | options:
11 | path: /etc/grafana/provisioning/dashboards
12 |
--------------------------------------------------------------------------------
/src/main/docker/mysql.yml:
--------------------------------------------------------------------------------
1 | # This configuration is intended for development purpose, it's **your** responsibility to harden it for production
2 | name: jhipsterdtosampleapplication
3 | services:
4 | mysql:
5 | image: mysql:9.2.0
6 | volumes:
7 | - ./config/mysql:/etc/mysql/conf.d
8 | environment:
9 | - MYSQL_ALLOW_EMPTY_PASSWORD=yes
10 | - MYSQL_DATABASE=jhipsterdtosampleapplication
11 | # If you want to expose these ports outside your dev PC,
12 | # remove the "127.0.0.1:" prefix
13 | ports:
14 | - 127.0.0.1:3306:3306
15 | command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
16 | healthcheck:
17 | test: ['CMD-SHELL', 'mysql -e "SHOW DATABASES;" && sleep 5']
18 | interval: 5s
19 | timeout: 10s
20 | retries: 10
21 |
--------------------------------------------------------------------------------
/src/main/docker/services.yml:
--------------------------------------------------------------------------------
1 | # This configuration is intended for development purpose, it's **your** responsibility to harden it for production
2 | name: jhipsterdtosampleapplication
3 | services:
4 | mysql:
5 | extends:
6 | file: ./mysql.yml
7 | service: mysql
8 | profiles:
9 | - ''
10 | - prod
11 |
--------------------------------------------------------------------------------
/src/main/docker/sonar.yml:
--------------------------------------------------------------------------------
1 | # This configuration is intended for development purpose, it's **your** responsibility to harden it for production
2 | name: jhipsterdtosampleapplication
3 | services:
4 | sonar:
5 | container_name: sonarqube
6 | image: sonarqube:25.5.0.107428-community
7 | # Forced authentication redirect for UI is turned off for out of the box experience while trying out SonarQube
8 | # For real use cases delete SONAR_FORCEAUTHENTICATION variable or set SONAR_FORCEAUTHENTICATION=true
9 | environment:
10 | - SONAR_FORCEAUTHENTICATION=false
11 | # If you want to expose these ports outside your dev PC,
12 | # remove the "127.0.0.1:" prefix
13 | ports:
14 | - 127.0.0.1:9001:9000
15 | - 127.0.0.1:9000:9000
16 |
--------------------------------------------------------------------------------
/src/main/java/io/github/jhipster/sample/ApplicationWebXml.java:
--------------------------------------------------------------------------------
1 | package io.github.jhipster.sample;
2 |
3 | import org.springframework.boot.builder.SpringApplicationBuilder;
4 | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
5 | import tech.jhipster.config.DefaultProfileUtil;
6 |
7 | /**
8 | * This is a helper Java class that provides an alternative to creating a {@code web.xml}.
9 | * This will be invoked only when the application is deployed to a Servlet container like Tomcat, JBoss etc.
10 | */
11 | public class ApplicationWebXml extends SpringBootServletInitializer {
12 |
13 | @Override
14 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
15 | // set a default to use when no profile is configured.
16 | DefaultProfileUtil.addDefaultProfile(application.application());
17 | return application.sources(JhipsterDtoSampleApplicationApp.class);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/io/github/jhipster/sample/GeneratedByJHipster.java:
--------------------------------------------------------------------------------
1 | package io.github.jhipster.sample;
2 |
3 | import jakarta.annotation.Generated;
4 | import java.lang.annotation.ElementType;
5 | import java.lang.annotation.Retention;
6 | import java.lang.annotation.RetentionPolicy;
7 | import java.lang.annotation.Target;
8 |
9 | @Generated(value = "JHipster", comments = "Generated by JHipster 8.11.0")
10 | @Retention(RetentionPolicy.SOURCE)
11 | @Target({ ElementType.TYPE })
12 | public @interface GeneratedByJHipster {
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/java/io/github/jhipster/sample/aop/logging/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Logging aspect.
3 | */
4 | package io.github.jhipster.sample.aop.logging;
5 |
--------------------------------------------------------------------------------
/src/main/java/io/github/jhipster/sample/config/ApplicationProperties.java:
--------------------------------------------------------------------------------
1 | package io.github.jhipster.sample.config;
2 |
3 | import org.springframework.boot.context.properties.ConfigurationProperties;
4 |
5 | /**
6 | * Properties specific to Jhipster Dto Sample Application.
7 | *
8 | * Properties are configured in the {@code application.yml} file.
9 | * See {@link tech.jhipster.config.JHipsterProperties} for a good example.
10 | */
11 | @ConfigurationProperties(prefix = "application", ignoreUnknownFields = false)
12 | public class ApplicationProperties {
13 |
14 | private final Liquibase liquibase = new Liquibase();
15 |
16 | // jhipster-needle-application-properties-property
17 |
18 | public Liquibase getLiquibase() {
19 | return liquibase;
20 | }
21 |
22 | // jhipster-needle-application-properties-property-getter
23 |
24 | public static class Liquibase {
25 |
26 | private Boolean asyncStart = true;
27 |
28 | public Boolean getAsyncStart() {
29 | return asyncStart;
30 | }
31 |
32 | public void setAsyncStart(Boolean asyncStart) {
33 | this.asyncStart = asyncStart;
34 | }
35 | }
36 | // jhipster-needle-application-properties-property-class
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/io/github/jhipster/sample/config/Constants.java:
--------------------------------------------------------------------------------
1 | package io.github.jhipster.sample.config;
2 |
3 | /**
4 | * Application constants.
5 | */
6 | public final class Constants {
7 |
8 | // Regex for acceptable logins
9 | public static final String LOGIN_REGEX = "^(?>[a-zA-Z0-9!$&*+=?^_`{|}~.-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*)|(?>[_.@A-Za-z0-9-]+)$";
10 |
11 | public static final String SYSTEM = "system";
12 | public static final String DEFAULT_LANGUAGE = "en";
13 |
14 | private Constants() {}
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/io/github/jhipster/sample/config/DateTimeFormatConfiguration.java:
--------------------------------------------------------------------------------
1 | package io.github.jhipster.sample.config;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.format.FormatterRegistry;
5 | import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar;
6 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
7 |
8 | /**
9 | * Configure the converters to use the ISO format for dates by default.
10 | */
11 | @Configuration
12 | public class DateTimeFormatConfiguration implements WebMvcConfigurer {
13 |
14 | @Override
15 | public void addFormatters(FormatterRegistry registry) {
16 | DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
17 | registrar.setUseIsoFormat(true);
18 | registrar.registerFormatters(registry);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/main/java/io/github/jhipster/sample/config/LoggingAspectConfiguration.java:
--------------------------------------------------------------------------------
1 | package io.github.jhipster.sample.config;
2 |
3 | import io.github.jhipster.sample.aop.logging.LoggingAspect;
4 | import org.springframework.context.annotation.*;
5 | import org.springframework.core.env.Environment;
6 | import tech.jhipster.config.JHipsterConstants;
7 |
8 | @Configuration
9 | @EnableAspectJAutoProxy
10 | public class LoggingAspectConfiguration {
11 |
12 | @Bean
13 | @Profile(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT)
14 | public LoggingAspect loggingAspect(Environment env) {
15 | return new LoggingAspect(env);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/main/java/io/github/jhipster/sample/config/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Application configuration.
3 | */
4 | package io.github.jhipster.sample.config;
5 |
--------------------------------------------------------------------------------
/src/main/java/io/github/jhipster/sample/domain/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Domain objects.
3 | */
4 | package io.github.jhipster.sample.domain;
5 |
--------------------------------------------------------------------------------
/src/main/java/io/github/jhipster/sample/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Application root.
3 | */
4 | package io.github.jhipster.sample;
5 |
--------------------------------------------------------------------------------
/src/main/java/io/github/jhipster/sample/repository/AuthorityRepository.java:
--------------------------------------------------------------------------------
1 | package io.github.jhipster.sample.repository;
2 |
3 | import io.github.jhipster.sample.domain.Authority;
4 | import org.springframework.data.jpa.repository.*;
5 | import org.springframework.stereotype.Repository;
6 |
7 | /**
8 | * Spring Data JPA repository for the Authority entity.
9 | */
10 | @SuppressWarnings("unused")
11 | @Repository
12 | public interface AuthorityRepository extends JpaRepository {}
13 |
--------------------------------------------------------------------------------
/src/main/java/io/github/jhipster/sample/repository/LabelRepository.java:
--------------------------------------------------------------------------------
1 | package io.github.jhipster.sample.repository;
2 |
3 | import io.github.jhipster.sample.domain.Label;
4 | import org.springframework.data.jpa.repository.*;
5 | import org.springframework.stereotype.Repository;
6 |
7 | /**
8 | * Spring Data JPA repository for the Label entity.
9 | */
10 | @SuppressWarnings("unused")
11 | @Repository
12 | public interface LabelRepository extends JpaRepository