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 Sep 12, 2017
1 parent 7ad5cb5 commit 6dd1269
Show file tree
Hide file tree
Showing 22 changed files with 227 additions and 8,189 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.7.0",
"jhipsterVersion": "4.8.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.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

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.

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

var gulp = require('gulp'),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"eslint-config-angular": "0.5.0",
"eslint-plugin-angular": "2.2.1",
"event-stream": "3.3.4",
"generator-jhipster": "4.7.0",
"generator-jhipster": "4.8.0",
"gulp": "3.9.1",
"gulp-angular-filesort": "1.1.1",
"gulp-angular-templatecache": "2.0.0",
Expand Down
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
<maven.version>3.0.0</maven.version>
<metrics-spring.version>3.1.3</metrics-spring.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 -->
<profile.no-liquibase />
<profile.swagger />
Expand Down Expand Up @@ -343,6 +344,11 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.zalando</groupId>
<artifactId>problem-spring-web</artifactId>
<version>${problem-spring-web.version}</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion src/main/docker/mysql.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '2'
services:
jhipsterjwtsampleapplication-mysql:
image: mysql:5.7.18
image: mysql:5.7.19
# volumes:
# - ~/volumes/jhipster/jhipsterJwtSampleApplication/mysql/:/var/lib/mysql/
environment:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

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

@Configuration
public class JacksonConfiguration {
Expand All @@ -24,4 +26,21 @@ public Hibernate5Module hibernate5Module() {
public AfterburnerModule 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();
}

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

import org.zalando.problem.AbstractThrowableProblem;

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

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

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

private static final long serialVersionUID = 1L;

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

public CustomParameterizedException(String message, Map<String, String> paramMap) {
super(message);
this.message = message;
this.paramMap.putAll(paramMap);
}

public ParameterizedErrorVM getErrorVM() {
return new ParameterizedErrorVM(message, paramMap);
public static Map<String, Object> toProblemParameters(String message, Map<String, Object> paramMap) {
Map<String, Object> parameters = new HashMap<>();
parameters.put("message", message);
parameters.put("params", paramMap);
return parameters;
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
package io.github.jhipster.sample.web.rest.errors;

import java.net.URI;

public final class ErrorConstants {

public static final String ERR_CONCURRENCY_FAILURE = "error.concurrencyFailure";
public static final String ERR_VALIDATION = "error.validation";
public static final String ERR_METHOD_NOT_SUPPORTED = "error.methodNotSupported";
public static final String ERR_INTERNAL_SERVER_ERROR = "error.internalServerError";
public static final URI DEFAULT_TYPE = URI.create("http://www.jhipster.tech/problem/problem-with-message");
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() {
}
Expand Down

This file was deleted.

Loading

0 comments on commit 6dd1269

Please sign in to comment.