Skip to content

Commit

Permalink
automatic project update
Browse files Browse the repository at this point in the history
  • Loading branch information
jdubois committed Mar 1, 2017
1 parent 6540c57 commit 2054e7d
Show file tree
Hide file tree
Showing 25 changed files with 238 additions and 193 deletions.
2 changes: 1 addition & 1 deletion .yo-rc.json
Expand Up @@ -24,7 +24,7 @@
"en" "en"
], ],
"serverPort": 8080, "serverPort": 8080,
"jhipsterVersion": "4.0.6", "jhipsterVersion": "4.0.7",
"enableSocialSignIn": false, "enableSocialSignIn": false,
"useSass": false, "useSass": false,
"jhiPrefix": "jhi", "jhiPrefix": "jhi",
Expand Down
16 changes: 8 additions & 8 deletions README.md
@@ -1,5 +1,5 @@
# jhipsterSampleApplication # jhipsterSampleApplication
This application was generated using JHipster 4.0.6, you can find documentation and help at [https://jhipster.github.io/documentation-archive/v4.0.6](https://jhipster.github.io/documentation-archive/v4.0.6). This application was generated using JHipster 4.0.7, you can find documentation and help at [https://jhipster.github.io/documentation-archive/v4.0.7](https://jhipster.github.io/documentation-archive/v4.0.7).


## Development ## Development


Expand Down Expand Up @@ -93,16 +93,16 @@ For more information refer to [Using Docker and Docker-Compose][], this page als


## Continuous Integration (optional) ## Continuous Integration (optional)


To set up a CI environment, consult the [Setting up Continuous Integration][] page. To configure CI for your project, run the ci-cd sub-generator (`yo jhipster:ci-cd`), this will let you generate configuration files for a number of Continuous Integration systems. Consult the [Setting up Continuous Integration][] page for more information.


[JHipster Homepage and latest documentation]: https://jhipster.github.io [JHipster Homepage and latest documentation]: https://jhipster.github.io
[JHipster 4.0.6 archive]: https://jhipster.github.io/documentation-archive/v4.0.6 [JHipster 4.0.7 archive]: https://jhipster.github.io/documentation-archive/v4.0.7


[Using JHipster in development]: https://jhipster.github.io/documentation-archive/v4.0.6/development/ [Using JHipster in development]: https://jhipster.github.io/documentation-archive/v4.0.7/development/
[Using Docker and Docker-Compose]: https://jhipster.github.io/documentation-archive/v4.0.6/docker-compose [Using Docker and Docker-Compose]: https://jhipster.github.io/documentation-archive/v4.0.7/docker-compose
[Using JHipster in production]: https://jhipster.github.io/documentation-archive/v4.0.6/production/ [Using JHipster in production]: https://jhipster.github.io/documentation-archive/v4.0.7/production/
[Running tests page]: https://jhipster.github.io/documentation-archive/v4.0.6/running-tests/ [Running tests page]: https://jhipster.github.io/documentation-archive/v4.0.7/running-tests/
[Setting up Continuous Integration]: https://jhipster.github.io/documentation-archive/v4.0.6/setting-up-ci/ [Setting up Continuous Integration]: https://jhipster.github.io/documentation-archive/v4.0.7/setting-up-ci/


[Gatling]: http://gatling.io/ [Gatling]: http://gatling.io/
[Node.js]: https://nodejs.org/ [Node.js]: https://nodejs.org/
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
@@ -1,4 +1,4 @@
// Generated on 2017-02-21 using generator-jhipster 4.0.6 // Generated on 2017-03-01 using generator-jhipster 4.0.7
'use strict'; 'use strict';


var gulp = require('gulp'), var gulp = require('gulp'),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -14,7 +14,7 @@
"eslint-config-angular": "0.5.0", "eslint-config-angular": "0.5.0",
"eslint-plugin-angular": "1.3.1", "eslint-plugin-angular": "1.3.1",
"event-stream": "3.3.4", "event-stream": "3.3.4",
"generator-jhipster": "4.0.6", "generator-jhipster": "4.0.7",
"gulp": "3.9.1", "gulp": "3.9.1",
"gulp-angular-filesort": "1.1.1", "gulp-angular-filesort": "1.1.1",
"gulp-angular-templatecache": "2.0.0", "gulp-angular-templatecache": "2.0.0",
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Expand Up @@ -29,14 +29,14 @@
<frontend-maven-plugin.version>1.3</frontend-maven-plugin.version> <frontend-maven-plugin.version>1.3</frontend-maven-plugin.version>
<gatling.version>2.2.3</gatling.version> <gatling.version>2.2.3</gatling.version>
<gatling-maven-plugin.version>2.2.1</gatling-maven-plugin.version> <gatling-maven-plugin.version>2.2.1</gatling-maven-plugin.version>
<hibernate.version>5.2.7.Final</hibernate.version> <hibernate.version>5.2.8.Final</hibernate.version>
<hikaricp.version>2.6.0</hikaricp.version> <hikaricp.version>2.6.0</hikaricp.version>
<jacoco-maven-plugin.version>0.7.9</jacoco-maven-plugin.version> <jacoco-maven-plugin.version>0.7.9</jacoco-maven-plugin.version>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<javassist.version>3.21.0-GA</javassist.version> <javassist.version>3.21.0-GA</javassist.version>
<jcache.version>1.0.0</jcache.version> <jcache.version>1.0.0</jcache.version>
<jzlib.version>1.1.3</jzlib.version> <jzlib.version>1.1.3</jzlib.version>
<jhipster.server.version>1.0.4</jhipster.server.version> <jhipster.server.version>1.1.0</jhipster.server.version>
<liquibase-hibernate5.version>3.6</liquibase-hibernate5.version> <liquibase-hibernate5.version>3.6</liquibase-hibernate5.version>
<liquibase-slf4j.version>2.0.0</liquibase-slf4j.version> <liquibase-slf4j.version>2.0.0</liquibase-slf4j.version>
<logstash-logback-encoder.version>4.8</logstash-logback-encoder.version> <logstash-logback-encoder.version>4.8</logstash-logback-encoder.version>
Expand Down
Expand Up @@ -35,7 +35,7 @@ public LoggingAspect(Environment env) {
*/ */
@Pointcut("within(io.github.jhipster.sample.repository..*) || within(io.github.jhipster.sample.service..*) || within(io.github.jhipster.sample.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() { public void loggingPointcut() {
// Method is empty as this is just a Poincut, the implementations are in the advices. // Method is empty as this is just a Pointcut, the implementations are in the advices.
} }


/** /**
Expand Down
@@ -1,7 +1,17 @@
package io.github.jhipster.sample.config; package io.github.jhipster.sample.config;


import io.github.jhipster.config.JHipsterProperties;
import org.ehcache.config.builders.CacheConfigurationBuilder;
import org.ehcache.config.builders.ResourcePoolsBuilder;
import org.ehcache.expiry.Duration;
import org.ehcache.expiry.Expirations;
import org.ehcache.jsr107.Eh107Configuration;

import java.util.concurrent.TimeUnit;

import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.AutoConfigureBefore; import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.cache.JCacheManagerCustomizer;
import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.*; import org.springframework.context.annotation.*;


Expand All @@ -10,4 +20,35 @@
@AutoConfigureAfter(value = { MetricsConfiguration.class }) @AutoConfigureAfter(value = { MetricsConfiguration.class })
@AutoConfigureBefore(value = { WebConfigurer.class, DatabaseConfiguration.class }) @AutoConfigureBefore(value = { WebConfigurer.class, DatabaseConfiguration.class })
public class CacheConfiguration { public class CacheConfiguration {

private final javax.cache.configuration.Configuration<Object, Object> jcacheConfiguration;

public CacheConfiguration(JHipsterProperties jHipsterProperties) {
JHipsterProperties.Cache.Ehcache ehcache =
jHipsterProperties.getCache().getEhcache();

jcacheConfiguration = Eh107Configuration.fromEhcacheCacheConfiguration(
CacheConfigurationBuilder.newCacheConfigurationBuilder(Object.class, Object.class,
ResourcePoolsBuilder.heap(ehcache.getMaxEntries()))
.withExpiry(Expirations.timeToLiveExpiration(Duration.of(ehcache.getTimeToLiveSeconds(), TimeUnit.SECONDS)))
.build());
}

@Bean
public JCacheManagerCustomizer cacheManagerCustomizer() {
return cm -> {
cm.createCache(io.github.jhipster.sample.domain.User.class.getName(), jcacheConfiguration);
cm.createCache(io.github.jhipster.sample.domain.Authority.class.getName(), jcacheConfiguration);
cm.createCache(io.github.jhipster.sample.domain.User.class.getName() + ".authorities", jcacheConfiguration);
cm.createCache(io.github.jhipster.sample.domain.PersistentToken.class.getName(), jcacheConfiguration);
cm.createCache(io.github.jhipster.sample.domain.User.class.getName() + ".persistentTokens", jcacheConfiguration);
cm.createCache(io.github.jhipster.sample.domain.BankAccount.class.getName(), jcacheConfiguration);
cm.createCache(io.github.jhipster.sample.domain.BankAccount.class.getName() + ".operations", jcacheConfiguration);
cm.createCache(io.github.jhipster.sample.domain.Label.class.getName(), jcacheConfiguration);
cm.createCache(io.github.jhipster.sample.domain.Label.class.getName() + ".operations", jcacheConfiguration);
cm.createCache(io.github.jhipster.sample.domain.Operation.class.getName(), jcacheConfiguration);
cm.createCache(io.github.jhipster.sample.domain.Operation.class.getName() + ".labels", jcacheConfiguration);
// jhipster-needle-ehcache-add-entry
};
}
} }
Expand Up @@ -2,7 +2,6 @@


import io.github.jhipster.config.locale.AngularCookieLocaleResolver; import io.github.jhipster.config.locale.AngularCookieLocaleResolver;


import org.springframework.boot.bind.RelaxedPropertyResolver;
import org.springframework.context.EnvironmentAware; import org.springframework.context.EnvironmentAware;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
Expand All @@ -15,12 +14,9 @@
@Configuration @Configuration
public class LocaleConfiguration extends WebMvcConfigurerAdapter implements EnvironmentAware { public class LocaleConfiguration extends WebMvcConfigurerAdapter implements EnvironmentAware {


@SuppressWarnings("unused")
private RelaxedPropertyResolver propertyResolver;

@Override @Override
public void setEnvironment(Environment environment) { public void setEnvironment(Environment environment) {
this.propertyResolver = new RelaxedPropertyResolver(environment, "spring.messages."); // unused
} }


@Bean(name = "localeResolver") @Bean(name = "localeResolver")
Expand Down
Expand Up @@ -83,13 +83,12 @@ public void customize(ConfigurableEmbeddedServletContainer container) {
* See the JHipsterProperties class and your application-*.yml configuration files * See the JHipsterProperties class and your application-*.yml configuration files
* for more information. * for more information.
*/ */
if (jHipsterProperties.getHttp().getVersion().equals(JHipsterProperties.Http.Version.V_2_0)) { if (jHipsterProperties.getHttp().getVersion().equals(JHipsterProperties.Http.Version.V_2_0) &&
if (container instanceof UndertowEmbeddedServletContainerFactory) { container instanceof UndertowEmbeddedServletContainerFactory) {
((UndertowEmbeddedServletContainerFactory) container)
.addBuilderCustomizers((builder) -> { ((UndertowEmbeddedServletContainerFactory) container)
builder.setServerOption(UndertowOptions.ENABLE_HTTP2, true); .addBuilderCustomizers(builder ->
}); builder.setServerOption(UndertowOptions.ENABLE_HTTP2, true));
}
} }
} }


Expand Down
Expand Up @@ -133,7 +133,7 @@ public ResponseEntity<UserDTO> getAccount() {
*/ */
@PostMapping("/account") @PostMapping("/account")
@Timed @Timed
public ResponseEntity<String> saveAccount(@Valid @RequestBody UserDTO userDTO) { public ResponseEntity saveAccount(@Valid @RequestBody UserDTO userDTO) {
Optional<User> existingUser = userRepository.findOneByEmail(userDTO.getEmail()); Optional<User> existingUser = userRepository.findOneByEmail(userDTO.getEmail());
if (existingUser.isPresent() && (!existingUser.get().getLogin().equalsIgnoreCase(userDTO.getLogin()))) { if (existingUser.isPresent() && (!existingUser.get().getLogin().equalsIgnoreCase(userDTO.getLogin()))) {
return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert("user-management", "emailexists", "Email already in use")).body(null); return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert("user-management", "emailexists", "Email already in use")).body(null);
Expand All @@ -143,7 +143,7 @@ public ResponseEntity<String> saveAccount(@Valid @RequestBody UserDTO userDTO) {
.map(u -> { .map(u -> {
userService.updateUser(userDTO.getFirstName(), userDTO.getLastName(), userDTO.getEmail(), userService.updateUser(userDTO.getFirstName(), userDTO.getLastName(), userDTO.getEmail(),
userDTO.getLangKey()); userDTO.getLangKey());
return new ResponseEntity<String>(HttpStatus.OK); return new ResponseEntity(HttpStatus.OK);
}) })
.orElseGet(() -> new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR)); .orElseGet(() -> new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR));
} }
Expand Down Expand Up @@ -244,8 +244,8 @@ public ResponseEntity<String> finishPasswordReset(@RequestBody KeyAndPasswordVM
} }


private boolean checkPasswordLength(String password) { private boolean checkPasswordLength(String password) {
return (!StringUtils.isEmpty(password) && return !StringUtils.isEmpty(password) &&
password.length() >= ManagedUserVM.PASSWORD_MIN_LENGTH && password.length() >= ManagedUserVM.PASSWORD_MIN_LENGTH &&
password.length() <= ManagedUserVM.PASSWORD_MAX_LENGTH); password.length() <= ManagedUserVM.PASSWORD_MAX_LENGTH;
} }
} }
Expand Up @@ -23,7 +23,7 @@ public class ExceptionTranslator {
@ExceptionHandler(ConcurrencyFailureException.class) @ExceptionHandler(ConcurrencyFailureException.class)
@ResponseStatus(HttpStatus.CONFLICT) @ResponseStatus(HttpStatus.CONFLICT)
@ResponseBody @ResponseBody
public ErrorVM processConcurencyError(ConcurrencyFailureException ex) { public ErrorVM processConcurrencyError(ConcurrencyFailureException ex) {
return new ErrorVM(ErrorConstants.ERR_CONCURRENCY_FAILURE); return new ErrorVM(ErrorConstants.ERR_CONCURRENCY_FAILURE);
} }


Expand Down
11 changes: 5 additions & 6 deletions src/main/resources/config/application-dev.yml
Expand Up @@ -41,12 +41,7 @@ spring:
hibernate.cache.use_second_level_cache: true hibernate.cache.use_second_level_cache: true
hibernate.cache.use_query_cache: false hibernate.cache.use_query_cache: false
hibernate.generate_statistics: true hibernate.generate_statistics: true
hibernate.javax.cache.provider: org.ehcache.jsr107.EhcacheCachingProvider hibernate.cache.region.factory_class: io.github.jhipster.config.jcache.NoDefaultJCacheRegionFactory
hibernate.javax.cache.uri: ${spring.cache.jcache.config}
hibernate.cache.region.factory_class: io.github.jhipster.config.jcache.SpringCacheRegionFactory
cache:
jcache:
config: config/ehcache/ehcache-dev.xml
mail: mail:
host: localhost host: localhost
port: 25 port: 25
Expand Down Expand Up @@ -89,6 +84,10 @@ server:
jhipster: jhipster:
http: http:
version: V_1_1 # To use HTTP/2 you will need SSL support (see above the "server.ssl" configuration) version: V_1_1 # To use HTTP/2 you will need SSL support (see above the "server.ssl" configuration)
cache: # Cache configuration
ehcache: # Ehcache configuration
time-to-live-seconds: 3600 # By default objects stay 1 hour in the cache
max-entries: 100 # Number of objects in each cache entry
security: security:
remember-me: remember-me:
# security key (this key should be unique for your application, and kept secret) # security key (this key should be unique for your application, and kept secret)
Expand Down
11 changes: 5 additions & 6 deletions src/main/resources/config/application-prod.yml
Expand Up @@ -39,12 +39,7 @@ spring:
hibernate.cache.use_second_level_cache: true hibernate.cache.use_second_level_cache: true
hibernate.cache.use_query_cache: false hibernate.cache.use_query_cache: false
hibernate.generate_statistics: false hibernate.generate_statistics: false
hibernate.javax.cache.provider: org.ehcache.jsr107.EhcacheCachingProvider hibernate.cache.region.factory_class: io.github.jhipster.config.jcache.NoDefaultJCacheRegionFactory
hibernate.javax.cache.uri: ${spring.cache.jcache.config}
hibernate.cache.region.factory_class: io.github.jhipster.config.jcache.SpringCacheRegionFactory
cache:
jcache:
config: config/ehcache/ehcache-prod.xml
mail: mail:
host: localhost host: localhost
port: 25 port: 25
Expand Down Expand Up @@ -91,6 +86,10 @@ jhipster:
version: V_1_1 # To use HTTP/2 you will need SSL support (see above the "server.ssl" configuration) version: V_1_1 # To use HTTP/2 you will need SSL support (see above the "server.ssl" configuration)
cache: # Used by the CachingHttpHeadersFilter cache: # Used by the CachingHttpHeadersFilter
timeToLiveInDays: 1461 timeToLiveInDays: 1461
cache: # Cache configuration
ehcache: # Ehcache configuration
time-to-live-seconds: 3600 # By default objects stay 1 hour in the cache
max-entries: 1000 # Number of objects in each cache entry
security: security:
remember-me: remember-me:
# security key (this key should be unique for your application, and kept secret) # security key (this key should be unique for your application, and kept secret)
Expand Down
36 changes: 0 additions & 36 deletions src/main/resources/config/ehcache/ehcache-dev.xml

This file was deleted.

36 changes: 0 additions & 36 deletions src/main/resources/config/ehcache/ehcache-prod.xml

This file was deleted.

Expand Up @@ -28,10 +28,10 @@ <h2 data-translate="userManagement.home.title">Users</h2>
<td>{{user.login}}</td> <td>{{user.login}}</td>
<td>{{user.email}}</td> <td>{{user.email}}</td>
<td> <td>
<span class="label label-danger hand" ng-click="vm.setActive(user, true)" ng-show="!user.activated" <button class="btn btn-danger btn-xs" ng-click="vm.setActive(user, true)" ng-show="!user.activated"
data-translate="userManagement.deactivated">Deactivated</span> data-translate="userManagement.deactivated">Deactivated</button>
<span class="label label-success hand" ng-click="vm.setActive(user, false)" ng-show="user.activated" <button class="btn btn-success btn-xs" ng-click="vm.setActive(user, false)" ng-show="user.activated"
data-translate="userManagement.activated">Activated</span> ng-disabled="vm.currentAccount.login==user.login" data-translate="userManagement.activated">Activated</button>
</td> </td>
<td>{{user.langKey}}</td> <td>{{user.langKey}}</td>
<td> <td>
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/app/components/language/language.filter.js
Expand Up @@ -22,6 +22,7 @@
'gl': 'Galego', 'gl': 'Galego',
'hu': 'Magyar', 'hu': 'Magyar',
'hi': 'हिंदी', 'hi': 'हिंदी',
'hy': 'Հայերեն',
'it': 'Italiano', 'it': 'Italiano',
'ja': '日本語', 'ja': '日本語',
'ko': '한국어', 'ko': '한국어',
Expand Down

0 comments on commit 2054e7d

Please sign in to comment.