Skip to content

Commit

Permalink
automatic project update
Browse files Browse the repository at this point in the history
  • Loading branch information
jdubois committed Sep 12, 2017
1 parent ed3068d commit 2958d27
Show file tree
Hide file tree
Showing 22 changed files with 227 additions and 8,207 deletions.
2 changes: 1 addition & 1 deletion .yo-rc.json
Expand Up @@ -23,7 +23,7 @@
"en" "en"
], ],
"serverPort": 8080, "serverPort": 8080,
"jhipsterVersion": "4.7.0", "jhipsterVersion": "4.8.0",
"enableSocialSignIn": false, "enableSocialSignIn": false,
"useSass": false, "useSass": false,
"jhiPrefix": "jhi", "jhiPrefix": "jhi",
Expand Down
14 changes: 7 additions & 7 deletions README.md
@@ -1,5 +1,5 @@
# jhipsterSampleApplication # jhipsterSampleApplication
This application was generated using JHipster 4.7.0, you can find documentation and help at [http://www.jhipster.tech/documentation-archive/v4.7.0](http://www.jhipster.tech/documentation-archive/v4.7.0). This application was generated using JHipster 4.8.0, you can find documentation and help at [http://www.jhipster.tech/documentation-archive/v4.8.0](http://www.jhipster.tech/documentation-archive/v4.8.0).


## Development ## Development


Expand Down Expand Up @@ -97,13 +97,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 (`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. To configure CI for your project, run the ci-cd sub-generator (`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]: http://www.jhipster.tech [JHipster Homepage and latest documentation]: http://www.jhipster.tech
[JHipster 4.7.0 archive]: http://www.jhipster.tech/documentation-archive/v4.7.0 [JHipster 4.8.0 archive]: http://www.jhipster.tech/documentation-archive/v4.8.0


[Using JHipster in development]: http://www.jhipster.tech/documentation-archive/v4.7.0/development/ [Using JHipster in development]: http://www.jhipster.tech/documentation-archive/v4.8.0/development/
[Using Docker and Docker-Compose]: http://www.jhipster.tech/documentation-archive/v4.7.0/docker-compose [Using Docker and Docker-Compose]: http://www.jhipster.tech/documentation-archive/v4.8.0/docker-compose
[Using JHipster in production]: http://www.jhipster.tech/documentation-archive/v4.7.0/production/ [Using JHipster in production]: http://www.jhipster.tech/documentation-archive/v4.8.0/production/
[Running tests page]: http://www.jhipster.tech/documentation-archive/v4.7.0/running-tests/ [Running tests page]: http://www.jhipster.tech/documentation-archive/v4.8.0/running-tests/
[Setting up Continuous Integration]: http://www.jhipster.tech/documentation-archive/v4.7.0/setting-up-ci/ [Setting up Continuous Integration]: http://www.jhipster.tech/documentation-archive/v4.8.0/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-09-08 using generator-jhipster 4.7.0 // Generated on 2017-09-12 using generator-jhipster 4.8.0
'use strict'; 'use strict';


var gulp = require('gulp'), var gulp = require('gulp'),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -15,7 +15,7 @@
"eslint-config-angular": "0.5.0", "eslint-config-angular": "0.5.0",
"eslint-plugin-angular": "2.2.1", "eslint-plugin-angular": "2.2.1",
"event-stream": "3.3.4", "event-stream": "3.3.4",
"generator-jhipster": "4.7.0", "generator-jhipster": "4.8.0",
"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
6 changes: 6 additions & 0 deletions pom.xml
Expand Up @@ -49,6 +49,7 @@
<maven.version>3.0.0</maven.version> <maven.version>3.0.0</maven.version>
<metrics-spring.version>3.1.3</metrics-spring.version> <metrics-spring.version>3.1.3</metrics-spring.version>
<node.version>v6.11.1</node.version> <node.version>v6.11.1</node.version>
<problem-spring-web.version>0.20.0</problem-spring-web.version>
<!-- These remain empty unless the corresponding profile is active --> <!-- These remain empty unless the corresponding profile is active -->
<profile.no-liquibase /> <profile.no-liquibase />
<profile.swagger /> <profile.swagger />
Expand Down Expand Up @@ -343,6 +344,11 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>org.zalando</groupId>
<artifactId>problem-spring-web</artifactId>
<version>${problem-spring-web.version}</version>
</dependency>
<dependency> <dependency>
<groupId>io.jsonwebtoken</groupId> <groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId> <artifactId>jjwt</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion src/main/docker/mysql.yml
@@ -1,7 +1,7 @@
version: '2' version: '2'
services: services:
jhipstersampleapplication-mysql: jhipstersampleapplication-mysql:
image: mysql:5.7.18 image: mysql:5.7.19
# volumes: # volumes:
# - ~/volumes/jhipster/jhipsterSampleApplication/mysql/:/var/lib/mysql/ # - ~/volumes/jhipster/jhipsterSampleApplication/mysql/:/var/lib/mysql/
environment: environment:
Expand Down
Expand Up @@ -5,6 +5,8 @@


import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.zalando.problem.ProblemModule;
import org.zalando.problem.validation.ConstraintViolationProblemModule;


@Configuration @Configuration
public class JacksonConfiguration { public class JacksonConfiguration {
Expand All @@ -24,4 +26,21 @@ public Hibernate5Module hibernate5Module() {
public AfterburnerModule afterburnerModule() { public AfterburnerModule afterburnerModule() {
return new AfterburnerModule(); return new AfterburnerModule();
} }

/*
* Module for serialization/deserialization of RFC7807 Problem.
*/
@Bean
ProblemModule problemModule() {
return new ProblemModule();
}

/*
* Module for serialization/deserialization of ConstraintViolationProblem.
*/
@Bean
ConstraintViolationProblemModule constraintViolationProblemModule() {
return new ConstraintViolationProblemModule();
}

} }
Expand Up @@ -53,7 +53,7 @@ public void init() {
try { try {
authenticationManagerBuilder authenticationManagerBuilder
.userDetailsService(userDetailsService) .userDetailsService(userDetailsService)
.passwordEncoder(passwordEncoder()); .passwordEncoder(passwordEncoder());
} catch (Exception e) { } catch (Exception e) {
throw new BeanInitializationException("Security configuration failed", e); throw new BeanInitializationException("Security configuration failed", e);
} }
Expand Down
@@ -1,8 +1,12 @@
package io.github.jhipster.sample.web.rest.errors; package io.github.jhipster.sample.web.rest.errors;


import org.zalando.problem.AbstractThrowableProblem;

import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;


import static org.zalando.problem.Status.BAD_REQUEST;

/** /**
* Custom, parameterized exception, which can be translated on the client side. * Custom, parameterized exception, which can be translated on the client side.
* For example: * For example:
Expand All @@ -17,33 +21,34 @@
* "error.myCustomError" : "The server says {{param0}} to {{param1}}" * "error.myCustomError" : "The server says {{param0}} to {{param1}}"
* </pre> * </pre>
*/ */
public class CustomParameterizedException extends RuntimeException { public class CustomParameterizedException extends AbstractThrowableProblem {


private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;


private static final String PARAM = "param"; private static final String PARAM = "param";


private final String message; public CustomParameterizedException(String message, String... params) {
this(message, toParamMap(params));
}


private final Map<String, String> paramMap = new HashMap<>(); public CustomParameterizedException(String message, Map<String, Object> paramMap) {
super(ErrorConstants.PARAMETERIZED_TYPE, "Parameterized Exception", BAD_REQUEST, null, null, null, toProblemParameters(message, paramMap));
}


public CustomParameterizedException(String message, String... params) { public static Map<String, Object> toParamMap(String... params) {
super(message); Map<String, Object> paramMap = new HashMap<>();
this.message = message;
if (params != null && params.length > 0) { if (params != null && params.length > 0) {
for (int i = 0; i < params.length; i++) { for (int i = 0; i < params.length; i++) {
paramMap.put(PARAM + i, params[i]); paramMap.put(PARAM + i, params[i]);
} }
} }
return paramMap;
} }


public CustomParameterizedException(String message, Map<String, String> paramMap) { public static Map<String, Object> toProblemParameters(String message, Map<String, Object> paramMap) {
super(message); Map<String, Object> parameters = new HashMap<>();
this.message = message; parameters.put("message", message);
this.paramMap.putAll(paramMap); parameters.put("params", paramMap);
} return parameters;

public ParameterizedErrorVM getErrorVM() {
return new ParameterizedErrorVM(message, paramMap);
} }
} }
@@ -1,11 +1,14 @@
package io.github.jhipster.sample.web.rest.errors; package io.github.jhipster.sample.web.rest.errors;


import java.net.URI;

public final class ErrorConstants { public final class ErrorConstants {


public static final String ERR_CONCURRENCY_FAILURE = "error.concurrencyFailure"; public static final String ERR_CONCURRENCY_FAILURE = "error.concurrencyFailure";
public static final String ERR_VALIDATION = "error.validation"; public static final String ERR_VALIDATION = "error.validation";
public static final String ERR_METHOD_NOT_SUPPORTED = "error.methodNotSupported"; public static final URI DEFAULT_TYPE = URI.create("http://www.jhipster.tech/problem/problem-with-message");
public static final String ERR_INTERNAL_SERVER_ERROR = "error.internalServerError"; public static final URI CONSTRAINT_VIOLATION_TYPE = URI.create("http://www.jhipster.tech/problem/contraint-violation");
public static final URI PARAMETERIZED_TYPE = URI.create("http://www.jhipster.tech/problem/parameterized");


private ErrorConstants() { private ErrorConstants() {
} }
Expand Down

This file was deleted.

0 comments on commit 2958d27

Please sign in to comment.