Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

Commit

Permalink
automatic project update
Browse files Browse the repository at this point in the history
  • Loading branch information
jdubois committed Mar 20, 2017
1 parent c4ab9bb commit 2718740
Show file tree
Hide file tree
Showing 17 changed files with 335 additions and 226 deletions.
2 changes: 1 addition & 1 deletion .yo-rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"en"
],
"serverPort": 8080,
"jhipsterVersion": "4.0.8",
"jhipsterVersion": "4.1.0",
"enableSocialSignIn": false,
"jwtSecretKey": "042e7d536354d3cdfab490925c55022efcb42bae",
"useSass": false,
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# jhipsterJwtSampleApplication
This application was generated using JHipster 4.0.8, you can find documentation and help at [https://jhipster.github.io/documentation-archive/v4.0.8](https://jhipster.github.io/documentation-archive/v4.0.8).
This application was generated using JHipster 4.1.0, you can find documentation and help at [https://jhipster.github.io/documentation-archive/v4.1.0](https://jhipster.github.io/documentation-archive/v4.1.0).

## Development

Expand Down Expand Up @@ -96,13 +96,13 @@ For more information refer to [Using Docker and Docker-Compose][], this page als
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 4.0.8 archive]: https://jhipster.github.io/documentation-archive/v4.0.8
[JHipster 4.1.0 archive]: https://jhipster.github.io/documentation-archive/v4.1.0

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

[Gatling]: http://gatling.io/
[Node.js]: https://nodejs.org/
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated on 2017-03-09 using generator-jhipster 4.0.8
// Generated on 2017-03-20 using generator-jhipster 4.1.0
'use strict';

var gulp = require('gulp'),
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"eslint-config-angular": "0.5.0",
"eslint-plugin-angular": "1.3.1",
"event-stream": "3.3.4",
"generator-jhipster": "4.0.8",
"generator-jhipster": "4.1.0",
"gulp": "3.9.1",
"gulp-angular-filesort": "1.1.1",
"gulp-angular-templatecache": "2.0.0",
Expand Down Expand Up @@ -61,7 +61,6 @@
"proxy-middleware": "0.15.0",
"run-sequence": "1.2.2",
"xml2js": "0.4.17",

"yargs": "5.0.0"
},
"engines": {
Expand Down
18 changes: 11 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<javassist.version>3.21.0-GA</javassist.version>
<jcache.version>1.0.0</jcache.version>
<jzlib.version>1.1.3</jzlib.version>
<jhipster.server.version>1.1.0</jhipster.server.version>
<jhipster.server.version>1.1.1</jhipster.server.version>
<jjwt.version>0.7.0</jjwt.version>
<liquibase-hibernate5.version>3.6</liquibase-hibernate5.version>
<liquibase-slf4j.version>2.0.0</liquibase-slf4j.version>
Expand Down Expand Up @@ -423,12 +423,16 @@
<resultsFolder>target/gatling/results</resultsFolder>
<bodiesFolder>src/test/gatling/bodies</bodiesFolder>
<simulationsFolder>src/test/gatling/simulations</simulationsFolder>
<!-- This will run multiple simulations one by one. Useful when doing gatling tests in CI
You must remove the simulationClass property in order to run multiple simulations -->
<!--<runMultipleSimulations>true</runMultipleSimulations>-->
<!-- This will force Gatling to ask which simulation to run
This is useful when you have multiple simulations -->
<simulationClass>*</simulationClass>
<!--
This will run multiple simulations one by one. Useful when doing Gatling
tests in CI.
-->
<runMultipleSimulations>true</runMultipleSimulations>
<!--
To run only one simulation, you need to disable the "runMultipleSimulations"
above, and write the name of your simulation below.
-->
<!--<simulationClass>WriteTheNameOfYourGatlingSimulation</simulationClass>-->
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ public void loggingPointcut() {

/**
* Advice that logs methods throwing exceptions.
*
* @param joinPoint join point for advice
* @param e exception
*/
@AfterThrowing(pointcut = "loggingPointcut()", throwing = "e")
public void logAfterThrowing(JoinPoint joinPoint, Throwable e) {
Expand All @@ -55,6 +58,10 @@ public void logAfterThrowing(JoinPoint joinPoint, Throwable e) {

/**
* Advice that logs when a method is entered and exited.
*
* @param joinPoint join point for advice
* @return result
* @throws Throwable throws IllegalArgumentException
*/
@Around("loggingPointcut()")
public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ public static void addDefaultProfile(SpringApplication app) {

/**
* Get the profiles that are applied else get default profiles.
*
* @param env spring environment
* @return profiles
*/
public static String[] getActiveProfiles(Environment env) {
String[] profiles = env.getActiveProfiles();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ public User createUser(UserDTO userDTO) {

/**
* Update basic information (first name, last name, email, language) for the current user.
*
* @param firstName first name of user
* @param lastName last name of user
* @param email email id of user
* @param langKey language key
*/
public void updateUser(String firstName, String lastName, String email, String langKey) {
userRepository.findOneByLogin(SecurityUtils.getCurrentUserLogin()).ifPresent(user -> {
Expand All @@ -151,6 +156,9 @@ public void updateUser(String firstName, String lastName, String email, String l

/**
* Update all information for a specific user, and return the modified user.
*
* @param userDTO user to update
* @return updated user
*/
public Optional<UserDTO> updateUser(UserDTO userDTO) {
return Optional.of(userRepository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ public ErrorVM processConcurrencyError(ConcurrencyFailureException ex) {
public ErrorVM processValidationError(MethodArgumentNotValidException ex) {
BindingResult result = ex.getBindingResult();
List<FieldError> fieldErrors = result.getFieldErrors();

return processFieldErrors(fieldErrors);
ErrorVM dto = new ErrorVM(ErrorConstants.ERR_VALIDATION);
for (FieldError fieldError : fieldErrors) {
dto.add(fieldError.getObjectName(), fieldError.getField(), fieldError.getCode());
}
return dto;
}

@ExceptionHandler(CustomParameterizedException.class)
Expand All @@ -51,16 +54,6 @@ public ErrorVM processAccessDeniedException(AccessDeniedException e) {
return new ErrorVM(ErrorConstants.ERR_ACCESS_DENIED, e.getMessage());
}

private ErrorVM processFieldErrors(List<FieldError> fieldErrors) {
ErrorVM dto = new ErrorVM(ErrorConstants.ERR_VALIDATION);

for (FieldError fieldError : fieldErrors) {
dto.add(fieldError.getObjectName(), fieldError.getField(), fieldError.getCode());
}

return dto;
}

@ExceptionHandler(HttpRequestMethodNotSupportedException.class)
@ResponseBody
@ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpHeaders;

/**
* Utility class for HTTP headers creation.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/config/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jhipster:
endpoint: /prometheusMetrics
logs: # Reports Dropwizard metrics in the logs
enabled: false
reportFrequency: 60 # in seconds
report-frequency: 60 # in seconds
logging:
logstash: # Forward logs to logstash over a socket, used by LoggingConfiguration
enabled: false
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/config/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jhipster:
endpoint: /prometheusMetrics
logs: # Reports Dropwizard metrics in the logs
enabled: false
reportFrequency: 60 # in seconds
report-frequency: 60 # in seconds
logging:
logstash: # Forward logs to logstash over a socket, used by LoggingConfiguration
enabled: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public static ZonedDateTimeMatcher sameInstant(ZonedDateTime date) {
/**
* Verifies the equals/hashcode contract on the domain object.
*/
@SuppressWarnings("unchecked")
public static void equalsVerifier(Class clazz) throws Exception {
Object domainObject1 = clazz.getConstructor().newInstance();
assertThat(domainObject1.toString()).isNotNull();
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/config/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spring:
database-platform: io.github.jhipster.domain.util.FixedH2Dialect
database: H2
open-in-view: false
show-sql: true
show-sql: false
hibernate:
ddl-auto: none
naming:
Expand Down Expand Up @@ -72,7 +72,7 @@ server:

jhipster:
async:
core-pool-size: 2
core-pool-size: 1
max-pool-size: 50
queue-capacity: 10000
security:
Expand Down
15 changes: 0 additions & 15 deletions src/test/resources/logback-test.xml

This file was deleted.

43 changes: 43 additions & 0 deletions src/test/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>

<configuration scan="true">
<include resource="org/springframework/boot/logging/logback/base.xml"/>

<logger name="io.github.jhipster.sample" level="INFO"/>

<logger name="io.github.jhipster" level="WARN"/>

<logger name="javax.activation" level="WARN"/>
<logger name="javax.mail" level="WARN"/>
<logger name="javax.xml.bind" level="WARN"/>
<logger name="ch.qos.logback" level="WARN"/>
<logger name="com.codahale.metrics" level="WARN"/>
<logger name="com.ryantenney" level="WARN"/>
<logger name="com.sun" level="WARN"/>
<logger name="com.zaxxer" level="WARN"/>
<logger name="io.undertow" level="WARN"/>
<logger name="io.undertow.websockets.jsr" level="ERROR"/>
<logger name="org.ehcache" level="WARN"/>
<logger name="org.apache" level="WARN"/>
<logger name="org.apache.catalina.startup.DigesterFactory" level="OFF"/>
<logger name="org.bson" level="WARN"/>
<logger name="org.hibernate.validator" level="WARN"/>
<logger name="org.hibernate" level="WARN"/>
<logger name="org.hibernate.ejb.HibernatePersistence" level="OFF"/>
<logger name="org.springframework" level="WARN"/>
<logger name="org.springframework.web" level="WARN"/>
<logger name="org.springframework.security" level="WARN"/>
<logger name="org.springframework.cache" level="WARN"/>
<logger name="org.thymeleaf" level="WARN"/>
<logger name="org.xnio" level="WARN"/>
<logger name="springfox" level="WARN"/>
<logger name="sun.rmi" level="WARN"/>
<logger name="liquibase" level="WARN"/>
<logger name="LiquibaseSchemaResolver" level="INFO"/>
<logger name="sun.rmi.transport" level="WARN"/>

<root level="WARN">
<appender-ref ref="CONSOLE"/>
</root>

</configuration>
Loading

0 comments on commit 2718740

Please sign in to comment.