automatic project update

This commit is contained in:
Julien Dubois 2016-05-23 17:52:33 +02:00
parent d26e2e99a3
commit fbc55bc9b1
280 changed files with 728 additions and 631 deletions

View File

@ -1,8 +1,8 @@
{
"generator-jhipster": {
"baseName": "sampleApplication",
"packageName": "com.mycompany.myapp",
"packageFolder": "com/mycompany/myapp",
"baseName": "jhipsterSampleApplication",
"packageName": "io.github.jhipster.sample",
"packageFolder": "io/github/jhipster/sample",
"authenticationType": "session",
"hibernateCache": "ehcache",
"clusteredHttpSession": "no",

View File

@ -1,4 +1,4 @@
# sampleApplication
# jhipsterSampleApplication
This application was generated using JHipster, you can find documentation and help at [https://jhipster.github.io](https://jhipster.github.io).
@ -31,7 +31,7 @@ Add the `-h` flag on any command to see how you can use it. For example, `bower
## Building for production
To optimize the sampleApplication client for production, run:
To optimize the jhipsterSampleApplication client for production, run:
./mvnw -Pprod clean package
@ -57,9 +57,9 @@ and can be run by starting Spring Boot in one terminal (`./mvnw spring-boot:run`
To setup this project in Jenkins, use the following configuration:
* Project name: `sampleApplication`
* Project name: `jhipsterSampleApplication`
* Source Code Management
* Git Repository: `git@github.com:xxxx/sampleApplication.git`
* Git Repository: `git@github.com:xxxx/jhipsterSampleApplication.git`
* Branches to build: `*/master`
* Additional Behaviours: `Wipe out repository & force clone`
* Build Triggers

View File

@ -1,6 +1,6 @@
{
"version": "0.0.0",
"name": "sample-application",
"name": "jhipster-sample-application",
"appPath": "src/main/webapp/",
"testPath": "src/test/javascript/spec",
"dependencies": {

View File

@ -1,4 +1,4 @@
// Generated on 2016-05-13 using generator-jhipster 3.3.0
// Generated on 2016-05-23 using generator-jhipster 3.3.0
'use strict';
var gulp = require('gulp'),
@ -161,7 +161,7 @@ gulp.task('html', function () {
return gulp.src(config.app + 'app/**/*.html')
.pipe(htmlmin({collapseWhitespace: true}))
.pipe(templateCache({
module: 'sampleApplicationApp',
module: 'jhipsterSampleApplicationApp',
root: 'app/',
moduleSystem: 'IIFE'
}))
@ -170,7 +170,7 @@ gulp.task('html', function () {
gulp.task('ngconstant:dev', function () {
return ngConstant({
name: 'sampleApplicationApp',
name: 'jhipsterSampleApplicationApp',
constants: {
VERSION: util.parseVersion(),
DEBUG_INFO_ENABLED: true
@ -184,7 +184,7 @@ gulp.task('ngconstant:dev', function () {
gulp.task('ngconstant:prod', function () {
return ngConstant({
name: 'sampleApplicationApp',
name: 'jhipsterSampleApplicationApp',
constants: {
VERSION: util.parseVersion(),
DEBUG_INFO_ENABLED: false

View File

@ -1,7 +1,7 @@
{
"name": "sample-application",
"name": "jhipster-sample-application",
"version": "0.0.0",
"description": "Description for sampleApplication",
"description": "Description for jhipsterSampleApplication",
"private": true,
"cacheDirectories": [
"node_modules",

99
pom.xml
View File

@ -9,11 +9,11 @@
<relativePath/>
</parent>
<groupId>com.mycompany.myapp</groupId>
<artifactId>sample-application</artifactId>
<groupId>io.github.jhipster.sample</groupId>
<artifactId>jhipster-sample-application</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>sampleApplication</name>
<name>Jhipster sample application</name>
<prerequisites>
<maven>3.0.0</maven>
@ -61,6 +61,9 @@
<sonar.sources>${project.basedir}/src/main/</sonar.sources>
<sonar.surefire.reportsPath>${project.testresult.directory}/surefire-reports</sonar.surefire.reportsPath>
<sonar.tests>${project.basedir}/src/test/</sonar.tests>
<!-- These remain empty unless the corresponding profile is active -->
<profile.no-liquibase></profile.no-liquibase>
<profile.no-swagger></profile.no-swagger>
</properties>
@ -372,22 +375,6 @@
</dependencies>
<build>
<defaultGoal>spring-boot:run</defaultGoal>
<resources>
<resource>
<directory>src/main/resources/</directory>
<filtering>true</filtering>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources/</directory>
<filtering>false</filtering>
<excludes>
<exclude>**/*.xml</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>com.github.ekryd.sortpom</groupId>
@ -458,6 +445,44 @@
</rules>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>default-resources</id>
<phase>validate</phase>
<goals>
<goal>resources</goal>
</goals>
<configuration>
<outputDirectory>target/classes</outputDirectory>
<useDefaultDelimiters>false</useDefaultDelimiters>
<delimiters>
<delimiter>#</delimiter>
</delimiters>
<resources>
<resource>
<directory>src/main/resources/</directory>
<filtering>true</filtering>
<includes>
<include>**/*.xml</include>
<include>**/*.yml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources/</directory>
<filtering>false</filtering>
<excludes>
<exclude>**/*.xml</exclude>
<exclude>**/*.yml</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
@ -546,9 +571,9 @@
<driver></driver>
<url></url>
<defaultSchemaName></defaultSchemaName>
<username>sampleApplication</username>
<username>jhipsterSampleApplication</username>
<password></password>
<referenceUrl>hibernate:spring:com.mycompany.myapp.domain?dialect=&amp;hibernate.ejb.naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringNamingStrategy</referenceUrl>
<referenceUrl>hibernate:spring:io.github.jhipster.sample.domain?dialect=&amp;hibernate.ejb.naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringNamingStrategy</referenceUrl>
<verbose>true</verbose>
<logging>debug</logging>
</configuration>
@ -579,9 +604,6 @@
Enable the line below to have remote debugging of your application on port 5005
<jvmArguments>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005</jvmArguments>
-->
<arguments>
<argument>--spring.profiles.active=dev</argument>
</arguments>
</configuration>
</plugin>
<plugin>
@ -589,7 +611,7 @@
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.5</version>
<configuration>
<imageName>sampleapplication</imageName>
<imageName>jhipstersampleapplication</imageName>
<dockerDirectory>src/main/docker</dockerDirectory>
<resources>
<resource>
@ -662,15 +684,23 @@
</build>
<profiles>
<profile>
<id>no-liquibase</id>
<properties>
<profile.no-liquibase>,no-liquibase</profile.no-liquibase>
</properties>
</profile>
<profile>
<id>no-swagger</id>
<properties>
<profile.no-swagger>,no-swagger</profile.no-swagger>
</properties>
</profile>
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<!-- log configuration -->
<logback.loglevel>DEBUG</logback.loglevel>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
@ -694,6 +724,12 @@
</plugin>
</plugins>
</build>
<properties>
<!-- log configuration -->
<logback.loglevel>DEBUG</logback.loglevel>
<!-- default Spring profiles -->
<spring.profiles.active>dev${profile.no-liquibase}${profile.no-swagger}</spring.profiles.active>
</properties>
</profile>
<profile>
<id>prod</id>
@ -783,9 +819,6 @@
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<executable>true</executable>
<arguments>
<argument>--spring.profiles.active=prod</argument>
</arguments>
</configuration>
</plugin>
</plugins>
@ -793,6 +826,8 @@
<properties>
<!-- log configuration -->
<logback.loglevel>INFO</logback.loglevel>
<!-- default Spring profiles -->
<spring.profiles.active>prod${profile.no-liquibase}${profile.no-swagger}</spring.profiles.active>
</properties>
</profile>
</profiles>

View File

@ -1,15 +1,15 @@
version: '2'
services:
sampleapplication-app:
image: sampleapplication
jhipstersampleapplication-app:
image: jhipstersampleapplication
external_links:
- sampleapplication-mysql:mysql
- jhipstersampleapplication-mysql:mysql
environment:
- SPRING_PROFILES_ACTIVE=prod
- SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/sampleapplication?useUnicode=true&characterEncoding=utf8&useSSL=false
- SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/jhipstersampleapplication?useUnicode=true&characterEncoding=utf8&useSSL=false
ports:
- 8080:8080
sampleapplication-mysql:
jhipstersampleapplication-mysql:
extends:
file: mysql.yml
service: sampleapplication-mysql
service: jhipstersampleapplication-mysql

View File

@ -1,14 +1,14 @@
version: '2'
services:
sampleapplication-mysql:
container_name: sampleapplication-mysql
image: mysql:5.7.11
jhipstersampleapplication-mysql:
container_name: jhipstersampleapplication-mysql
image: mysql:5.7.12
# volumes:
# - ~/volumes/jhipster/sampleApplication/mysql/:/var/lib/mysql/
# - ~/volumes/jhipster/jhipsterSampleApplication/mysql/:/var/lib/mysql/
environment:
- MYSQL_USER=root
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
- MYSQL_DATABASE=sampleapplication
- MYSQL_DATABASE=jhipstersampleapplication
ports:
- 3306:3306
command: mysqld --lower_case_table_names=1 --skip-ssl

View File

@ -1,8 +1,8 @@
version: '2'
services:
sampleapplication-sonar:
container_name: sampleapplication-sonar
image: sonarqube:5.3
jhipstersampleapplication-sonar:
container_name: jhipstersampleapplication-sonar
image: sonarqube:5.5-alpine
ports:
- 9000:9000
- 9092:9092

View File

@ -1,4 +0,0 @@
/**
* Async helpers.
*/
package com.mycompany.myapp.async;

View File

@ -1,4 +0,0 @@
/**
* Swagger api specific code.
*/
package com.mycompany.myapp.config.apidoc;

View File

@ -1,4 +0,0 @@
/**
* Audit specific code.
*/
package com.mycompany.myapp.config.audit;

View File

@ -1,4 +0,0 @@
/**
* Liquibase specific code.
*/
package com.mycompany.myapp.config.liquibase;

View File

@ -1,4 +0,0 @@
/**
* Locale specific code.
*/
package com.mycompany.myapp.config.locale;

View File

@ -1,4 +0,0 @@
/**
* JPA domain objects.
*/
package com.mycompany.myapp.domain;

View File

@ -1,4 +0,0 @@
/**
* Spring Data JPA repositories.
*/
package com.mycompany.myapp.repository;

View File

@ -1,4 +0,0 @@
/**
* Spring Security configuration.
*/
package com.mycompany.myapp.security;

View File

@ -1,4 +0,0 @@
/**
* Service layer beans.
*/
package com.mycompany.myapp.service;

View File

@ -1,4 +0,0 @@
/**
* Servlet filters.
*/
package com.mycompany.myapp.web.filter;

View File

@ -1,4 +0,0 @@
/**
* Spring MVC REST controllers.
*/
package com.mycompany.myapp.web.rest;

View File

@ -1,5 +1,6 @@
package com.mycompany.myapp;
package io.github.jhipster.sample;
import io.github.jhipster.sample.config.DefaultProfileUtil;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.web.SpringBootServletInitializer;
@ -14,7 +15,7 @@ public class ApplicationWebXml extends SpringBootServletInitializer {
/**
* set a default to use when no profile is configured.
*/
SampleApplicationApp.addDefaultProfile(application.application());
return application.sources(SampleApplicationApp.class);
DefaultProfileUtil.addDefaultProfile(application.application());
return application.sources(JhipsterSampleApplicationApp.class);
}
}

View File

@ -1,7 +1,8 @@
package com.mycompany.myapp;
package io.github.jhipster.sample;
import com.mycompany.myapp.config.Constants;
import com.mycompany.myapp.config.JHipsterProperties;
import io.github.jhipster.sample.config.Constants;
import io.github.jhipster.sample.config.DefaultProfileUtil;
import io.github.jhipster.sample.config.JHipsterProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -19,21 +20,19 @@ import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
@ComponentScan
@EnableAutoConfiguration(exclude = { MetricFilterAutoConfiguration.class, MetricRepositoryAutoConfiguration.class })
@EnableConfigurationProperties({ JHipsterProperties.class, LiquibaseProperties.class })
public class SampleApplicationApp {
public class JhipsterSampleApplicationApp {
private static final Logger log = LoggerFactory.getLogger(SampleApplicationApp.class);
private static final Logger log = LoggerFactory.getLogger(JhipsterSampleApplicationApp.class);
@Inject
private Environment env;
/**
* Initializes sampleApplication.
* Initializes jhipsterSampleApplication.
* <p>
* Spring profiles can be configured with a program arguments --spring.profiles.active=your-active-profile
* <p>
@ -41,19 +40,15 @@ public class SampleApplicationApp {
*/
@PostConstruct
public void initApplication() {
if (env.getActiveProfiles().length == 0) {
log.warn("No Spring profile configured, running with default profile: {}", Constants.SPRING_PROFILE_DEVELOPMENT);
} else {
log.info("Running with Spring profile(s) : {}", Arrays.toString(env.getActiveProfiles()));
Collection<String> activeProfiles = Arrays.asList(env.getActiveProfiles());
if (activeProfiles.contains(Constants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(Constants.SPRING_PROFILE_PRODUCTION)) {
log.error("You have misconfigured your application! It should not run " +
"with both the 'dev' and 'prod' profiles at the same time.");
}
if (activeProfiles.contains(Constants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(Constants.SPRING_PROFILE_CLOUD)) {
log.error("You have misconfigured your application! It should not" +
"run with both the 'dev' and 'cloud' profiles at the same time.");
}
log.info("Running with Spring profile(s) : {}", Arrays.toString(env.getActiveProfiles()));
Collection<String> activeProfiles = Arrays.asList(env.getActiveProfiles());
if (activeProfiles.contains(Constants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(Constants.SPRING_PROFILE_PRODUCTION)) {
log.error("You have misconfigured your application! It should not run " +
"with both the 'dev' and 'prod' profiles at the same time.");
}
if (activeProfiles.contains(Constants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(Constants.SPRING_PROFILE_CLOUD)) {
log.error("You have misconfigured your application! It should not" +
"run with both the 'dev' and 'cloud' profiles at the same time.");
}
}
@ -64,8 +59,8 @@ public class SampleApplicationApp {
* @throws UnknownHostException if the local host name could not be resolved into an address
*/
public static void main(String[] args) throws UnknownHostException {
SpringApplication app = new SpringApplication(SampleApplicationApp.class);
addDefaultProfile(app);
SpringApplication app = new SpringApplication(JhipsterSampleApplicationApp.class);
DefaultProfileUtil.addDefaultProfile(app);
Environment env = app.run(args).getEnvironment();
log.info("\n----------------------------------------------------------\n\t" +
"Application '{}' is running! Access URLs:\n\t" +
@ -78,17 +73,4 @@ public class SampleApplicationApp {
}
/**
* set a default to use when no profile is configured.
*/
protected static void addDefaultProfile(SpringApplication app) {
Map<String, Object> defProperties = new HashMap<>();
/*
* The default profile to use when no other profiles are defined
* This cannot be set in the `application.yml` file.
* See https://github.com/spring-projects/spring-boot/issues/1219
*/
defProperties.put("spring.profiles.default", Constants.SPRING_PROFILE_DEVELOPMENT);
app.setDefaultProperties(defProperties);
}
}

View File

@ -1,6 +1,6 @@
package com.mycompany.myapp.aop.logging;
package io.github.jhipster.sample.aop.logging;
import com.mycompany.myapp.config.Constants;
import io.github.jhipster.sample.config.Constants;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
@ -26,7 +26,7 @@ public class LoggingAspect {
@Inject
private Environment env;
@Pointcut("within(com.mycompany.myapp.repository..*) || within(com.mycompany.myapp.service..*) || within(com.mycompany.myapp.web.rest..*)")
@Pointcut("within(io.github.jhipster.sample.repository..*) || within(io.github.jhipster.sample.service..*) || within(io.github.jhipster.sample.web.rest..*)")
public void loggingPointcut() {
}

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.async;
package io.github.jhipster.sample.async;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;

View File

@ -0,0 +1,4 @@
/**
* Async helpers.
*/
package io.github.jhipster.sample.async;

View File

@ -1,6 +1,6 @@
package com.mycompany.myapp.config;
package io.github.jhipster.sample.config;
import com.mycompany.myapp.async.ExceptionHandlingAsyncTaskExecutor;
import io.github.jhipster.sample.async.ExceptionHandlingAsyncTaskExecutor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -33,7 +33,7 @@ public class AsyncConfiguration implements AsyncConfigurer {
executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize());
executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize());
executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity());
executor.setThreadNamePrefix("sample-application-Executor-");
executor.setThreadNamePrefix("jhipster-sample-application-Executor-");
return new ExceptionHandlingAsyncTaskExecutor(executor);
}

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.config;
package io.github.jhipster.sample.config;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.ehcache.InstrumentedEhcache;

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.config;
package io.github.jhipster.sample.config;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.config;
package io.github.jhipster.sample.config;
/**
* Application constants.

View File

@ -1,6 +1,6 @@
package com.mycompany.myapp.config;
package io.github.jhipster.sample.config;
import com.mycompany.myapp.config.liquibase.AsyncSpringLiquibase;
import io.github.jhipster.sample.config.liquibase.AsyncSpringLiquibase;
import com.codahale.metrics.MetricRegistry;
import com.fasterxml.jackson.datatype.hibernate4.Hibernate4Module;
@ -30,7 +30,7 @@ import java.sql.SQLException;
import java.util.Arrays;
@Configuration
@EnableJpaRepositories("com.mycompany.myapp.repository")
@EnableJpaRepositories("io.github.jhipster.sample.repository")
@EnableJpaAuditing(auditorAwareRef = "springSecurityAuditorAware")
@EnableTransactionManagement
public class DatabaseConfiguration {

View File

@ -0,0 +1,71 @@
package io.github.jhipster.sample.config;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.config.YamlPropertiesFactoryBean;
import org.springframework.boot.SpringApplication;
import org.springframework.core.io.ClassPathResource;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
/**
* Utility class to load a Spring profile to be used as default
* when there is no <code>spring.profiles.active</code> set in the environment or as command line argument.
* If the value is not available in <code>application.yml</code> then <code>dev</code> profile will be used as default.
*/
public final class DefaultProfileUtil {
private static final long serialVersionUID = 1L;
private static final Logger log = LoggerFactory.getLogger(DefaultProfileUtil.class);
private static final String SPRING_PROFILE_ACTIVE = "spring.profiles.active";
private static final Properties BUILD_PROPERTIES = readProperties();
/**
* Get a default profile from <code>application.yml</code>.
*/
public static String getDefaultActiveProfiles(){
if (BUILD_PROPERTIES != null) {
String activeProfile = BUILD_PROPERTIES.getProperty(SPRING_PROFILE_ACTIVE);
if (activeProfile != null && !activeProfile.isEmpty() &&
(activeProfile.contains(Constants.SPRING_PROFILE_DEVELOPMENT) ||
activeProfile.contains(Constants.SPRING_PROFILE_PRODUCTION))) {
return activeProfile;
}
}
log.warn("No Spring profile configured, running with default profile: {}", Constants.SPRING_PROFILE_DEVELOPMENT);
return Constants.SPRING_PROFILE_DEVELOPMENT;
}
/**
* Set a default to use when no profile is configured.
*/
public static void addDefaultProfile(SpringApplication app) {
Map<String, Object> defProperties = new HashMap<>();
/*
* The default profile to use when no other profiles are defined
* This cannot be set in the <code>application.yml</code> file.
* See https://github.com/spring-projects/spring-boot/issues/1219
*/
defProperties.put(SPRING_PROFILE_ACTIVE, getDefaultActiveProfiles());
app.setDefaultProperties(defProperties);
}
/**
* Load application.yml from classpath.
*/
private static Properties readProperties() {
try {
YamlPropertiesFactoryBean factory = new YamlPropertiesFactoryBean();
factory.setResources(new ClassPathResource("config/application.yml"));
return factory.getObject();
} catch (Exception e) {
log.error("Failed to read application.yml to get default profile");
}
return null;
}
}

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.config;
package io.github.jhipster.sample.config;
import javax.validation.constraints.NotNull;
@ -159,7 +159,7 @@ public class JHipsterProperties {
public static class Mail {
private String from = "sampleApplication@localhost";
private String from = "jhipsterSampleApplication@localhost";
public String getFrom() {
return from;
@ -195,9 +195,9 @@ public class JHipsterProperties {
public static class Swagger {
private String title = "sampleApplication API";
private String title = "jhipsterSampleApplication API";
private String description = "sampleApplication API documentation";
private String description = "jhipsterSampleApplication API documentation";
private String version = "0.0.1";
@ -377,7 +377,7 @@ public class JHipsterProperties {
private int port = 2003;
private String prefix = "sampleApplication";
private String prefix = "jhipsterSampleApplication";
public boolean isEnabled() {
return enabled;

View File

@ -1,6 +1,6 @@
package com.mycompany.myapp.config;
package io.github.jhipster.sample.config;
import com.mycompany.myapp.domain.util.*;
import io.github.jhipster.sample.domain.util.*;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import java.time.*;

View File

@ -1,6 +1,6 @@
package com.mycompany.myapp.config;
package io.github.jhipster.sample.config;
import com.mycompany.myapp.config.locale.AngularCookieLocaleResolver;
import io.github.jhipster.sample.config.locale.AngularCookieLocaleResolver;
import org.springframework.boot.bind.RelaxedPropertyResolver;
import org.springframework.context.EnvironmentAware;

View File

@ -1,6 +1,6 @@
package com.mycompany.myapp.config;
package io.github.jhipster.sample.config;
import com.mycompany.myapp.aop.logging.LoggingAspect;
import io.github.jhipster.sample.aop.logging.LoggingAspect;
import org.springframework.context.annotation.*;
@Configuration

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.config;
package io.github.jhipster.sample.config;
import ch.qos.logback.classic.AsyncAppender;
import ch.qos.logback.classic.LoggerContext;

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.config;
package io.github.jhipster.sample.config;
import com.codahale.metrics.JmxReporter;

View File

@ -1,8 +1,8 @@
package com.mycompany.myapp.config;
package io.github.jhipster.sample.config;
import com.mycompany.myapp.security.*;
import com.mycompany.myapp.web.filter.CsrfCookieGeneratorFilter;
import com.mycompany.myapp.config.JHipsterProperties;
import io.github.jhipster.sample.security.*;
import io.github.jhipster.sample.web.filter.CsrfCookieGeneratorFilter;
import io.github.jhipster.sample.config.JHipsterProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.config;
package io.github.jhipster.sample.config;
import org.apache.commons.lang.CharEncoding;
import org.slf4j.Logger;

View File

@ -1,9 +1,9 @@
package com.mycompany.myapp.config;
package io.github.jhipster.sample.config;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.servlet.InstrumentedFilter;
import com.codahale.metrics.servlets.MetricsServlet;
import com.mycompany.myapp.web.filter.CachingHttpHeadersFilter;
import io.github.jhipster.sample.web.filter.CachingHttpHeadersFilter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

View File

@ -1,7 +1,7 @@
package com.mycompany.myapp.config.apidoc;
package io.github.jhipster.sample.config.apidoc;
import com.mycompany.myapp.config.Constants;
import com.mycompany.myapp.config.JHipsterProperties;
import io.github.jhipster.sample.config.Constants;
import io.github.jhipster.sample.config.JHipsterProperties;
import java.util.Date;
import org.slf4j.Logger;

View File

@ -0,0 +1,4 @@
/**
* Swagger api specific code.
*/
package io.github.jhipster.sample.config.apidoc;

View File

@ -1,6 +1,6 @@
package com.mycompany.myapp.config.audit;
package io.github.jhipster.sample.config.audit;
import com.mycompany.myapp.domain.PersistentAuditEvent;
import io.github.jhipster.sample.domain.PersistentAuditEvent;
import org.springframework.boot.actuate.audit.AuditEvent;
import org.springframework.security.web.authentication.WebAuthenticationDetails;

View File

@ -0,0 +1,4 @@
/**
* Audit specific code.
*/
package io.github.jhipster.sample.config.audit;

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.config.liquibase;
package io.github.jhipster.sample.config.liquibase;
import javax.inject.Inject;
@ -9,7 +9,7 @@ import org.springframework.core.env.Environment;
import org.springframework.core.task.TaskExecutor;
import org.springframework.util.StopWatch;
import com.mycompany.myapp.config.Constants;
import io.github.jhipster.sample.config.Constants;
import liquibase.exception.LiquibaseException;
import liquibase.integration.spring.SpringLiquibase;

View File

@ -0,0 +1,4 @@
/**
* Liquibase specific code.
*/
package io.github.jhipster.sample.config.liquibase;

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.config.locale;
package io.github.jhipster.sample.config.locale;
import org.springframework.context.i18n.LocaleContext;
import org.springframework.context.i18n.TimeZoneAwareLocaleContext;

View File

@ -0,0 +1,4 @@
/**
* Locale specific code.
*/
package io.github.jhipster.sample.config.locale;

View File

@ -1,4 +1,4 @@
/**
* Spring Framework configuration files.
*/
package com.mycompany.myapp.config;
package io.github.jhipster.sample.config;

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.domain;
package io.github.jhipster.sample.domain;
import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.domain;
package io.github.jhipster.sample.domain;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.domain;
package io.github.jhipster.sample.domain;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.hibernate.annotations.Cache;

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.domain;
package io.github.jhipster.sample.domain;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.hibernate.annotations.Cache;

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.domain;
package io.github.jhipster.sample.domain;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.domain;
package io.github.jhipster.sample.domain;
import java.time.LocalDateTime;
import javax.persistence.*;

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.domain;
package io.github.jhipster.sample.domain;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
@ -15,7 +15,7 @@ import java.io.Serializable;
/**
* Persistent tokens are used by Spring Security to automatically log in users.
*
* @see com.mycompany.myapp.security.CustomPersistentRememberMeServices
* @see io.github.jhipster.sample.security.CustomPersistentRememberMeServices
*/
@Entity
@Table(name = "jhi_persistent_token")

View File

@ -1,6 +1,6 @@
package com.mycompany.myapp.domain;
package io.github.jhipster.sample.domain;
import com.mycompany.myapp.config.Constants;
import io.github.jhipster.sample.config.Constants;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.hibernate.annotations.Cache;

View File

@ -0,0 +1,4 @@
/**
* JPA domain objects.
*/
package io.github.jhipster.sample.domain;

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.domain.util;
package io.github.jhipster.sample.domain.util;
import java.sql.Types;

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.domain.util;
package io.github.jhipster.sample.domain.util;
import java.time.*;
import java.util.Date;

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.domain.util;
package io.github.jhipster.sample.domain.util;
import java.io.IOException;
import java.time.ZoneId;

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.domain.util;
package io.github.jhipster.sample.domain.util;
import java.io.IOException;
import java.time.LocalDate;

View File

@ -1,6 +1,6 @@
package com.mycompany.myapp.domain.util;
package io.github.jhipster.sample.domain.util;
import com.mycompany.myapp.domain.util.JSR310DateConverters.*;
import io.github.jhipster.sample.domain.util.JSR310DateConverters.*;
import java.time.*;
import java.util.Date;

View File

@ -1,6 +1,6 @@
package com.mycompany.myapp.repository;
package io.github.jhipster.sample.repository;
import com.mycompany.myapp.domain.Authority;
import io.github.jhipster.sample.domain.Authority;
import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,6 +1,6 @@
package com.mycompany.myapp.repository;
package io.github.jhipster.sample.repository;
import com.mycompany.myapp.domain.BankAccount;
import io.github.jhipster.sample.domain.BankAccount;
import org.springframework.data.jpa.repository.*;

View File

@ -1,7 +1,7 @@
package com.mycompany.myapp.repository;
package io.github.jhipster.sample.repository;
import com.mycompany.myapp.config.audit.AuditEventConverter;
import com.mycompany.myapp.domain.PersistentAuditEvent;
import io.github.jhipster.sample.config.audit.AuditEventConverter;
import io.github.jhipster.sample.domain.PersistentAuditEvent;
import org.springframework.boot.actuate.audit.AuditEvent;
import org.springframework.boot.actuate.audit.AuditEventRepository;

View File

@ -1,6 +1,6 @@
package com.mycompany.myapp.repository;
package io.github.jhipster.sample.repository;
import com.mycompany.myapp.domain.Label;
import io.github.jhipster.sample.domain.Label;
import org.springframework.data.jpa.repository.*;

View File

@ -1,6 +1,6 @@
package com.mycompany.myapp.repository;
package io.github.jhipster.sample.repository;
import com.mycompany.myapp.domain.Operation;
import io.github.jhipster.sample.domain.Operation;
import org.springframework.data.jpa.repository.*;
import org.springframework.data.repository.query.Param;

View File

@ -1,6 +1,6 @@
package com.mycompany.myapp.repository;
package io.github.jhipster.sample.repository;
import com.mycompany.myapp.domain.PersistentAuditEvent;
import io.github.jhipster.sample.domain.PersistentAuditEvent;
import java.time.LocalDateTime;
import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,7 +1,7 @@
package com.mycompany.myapp.repository;
package io.github.jhipster.sample.repository;
import com.mycompany.myapp.domain.PersistentToken;
import com.mycompany.myapp.domain.User;
import io.github.jhipster.sample.domain.PersistentToken;
import io.github.jhipster.sample.domain.User;
import java.time.LocalDate;
import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,6 +1,6 @@
package com.mycompany.myapp.repository;
package io.github.jhipster.sample.repository;
import com.mycompany.myapp.domain.User;
import io.github.jhipster.sample.domain.User;
import java.time.ZonedDateTime;
import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -0,0 +1,4 @@
/**
* Spring Data JPA repositories.
*/
package io.github.jhipster.sample.repository;

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.security;
package io.github.jhipster.sample.security;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler;

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.security;
package io.github.jhipster.sample.security;
import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler;

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.security;
package io.github.jhipster.sample.security;
import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler;

View File

@ -1,4 +1,4 @@
package com.mycompany.myapp.security;
package io.github.jhipster.sample.security;
/**
* Constants for Spring Security authorities.