Skip to content

Commit

Permalink
automatic project update
Browse files Browse the repository at this point in the history
  • Loading branch information
jdubois committed Dec 8, 2016
1 parent 457d431 commit ad0c353
Show file tree
Hide file tree
Showing 26 changed files with 231 additions and 79 deletions.
2 changes: 1 addition & 1 deletion .yo-rc.json
Expand Up @@ -24,7 +24,7 @@
"en"
],
"serverPort": 8080,
"jhipsterVersion": "3.12.0",
"jhipsterVersion": "3.12.1",
"enableSocialSignIn": false,
"useSass": false,
"jhiPrefix": "jhi",
Expand Down
14 changes: 7 additions & 7 deletions README.md
@@ -1,6 +1,6 @@
# jhipsterSampleApplication

This application was generated using JHipster 3.11.0, you can find documentation and help at [https://jhipster.github.io/documentation-archive/v3.11.0](https://jhipster.github.io/documentation-archive/v3.11.0).
This application was generated using JHipster 3.12.0, you can find documentation and help at [https://jhipster.github.io/documentation-archive/v3.12.0](https://jhipster.github.io/documentation-archive/v3.12.0).

## Development

Expand Down Expand Up @@ -93,13 +93,13 @@ For more information refer to [Using Docker and Docker-Compose][], this page als
To set up a CI environment, consult the [Setting up Continuous Integration][] page.

[JHipster Homepage and latest documentation]: https://jhipster.github.io
[JHipster 3.11.0 archive]: https://jhipster.github.io/documentation-archive/v3.11.0
[JHipster 3.12.0 archive]: https://jhipster.github.io/documentation-archive/v3.12.0

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

[Gatling]: http://gatling.io/
[Node.js]: https://nodejs.org/
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
@@ -1,4 +1,4 @@
// Generated on 2016-11-30 using generator-jhipster 3.12.0
// Generated on 2016-12-08 using generator-jhipster 3.12.1
'use strict';

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-plugin-angular": "1.3.1",
"event-stream": "3.3.4",
"generator-jhipster": "3.12.0",
"generator-jhipster": "3.12.1",
"gulp": "3.9.1",
"gulp-angular-filesort": "1.1.1",
"gulp-angular-templatecache": "2.0.0",
Expand Down
15 changes: 14 additions & 1 deletion pom.xml
Expand Up @@ -54,7 +54,20 @@
<project.testresult.directory>${project.build.directory}/test-results</project.testresult.directory>
<sonar-maven-plugin.version>3.2</sonar-maven-plugin.version>
<jacoco-maven-plugin.version>0.7.7.201606060606</jacoco-maven-plugin.version>
<sonar.exclusions>src/main/webapp/content/**/*.*, src/main/webapp/bower_components/**/*.*, target/www/**/*.*</sonar.exclusions>
<sonar.exclusions>src/main/webapp/content/**/*.*, src/main/webapp/bower_components/**/*.*, src/main/webapp/i18n/*.js, target/www/**/*.*</sonar.exclusions>

<sonar.issue.ignore.multicriteria>S3437,UndocumentedApi,BoldAndItalicTagsCheck</sonar.issue.ignore.multicriteria>

<!-- Rule https://sonarqube.com/coding_rules#rule_key=squid%3AS3437 is ignored, as a JPA-managed field cannot be transient -->
<sonar.issue.ignore.multicriteria.S3437.ruleKey>squid:S3437</sonar.issue.ignore.multicriteria.S3437.ruleKey>
<sonar.issue.ignore.multicriteria.S3437.resourceKey>src/main/java/**/*</sonar.issue.ignore.multicriteria.S3437.resourceKey>
<!-- Rule http://sonarqube.com/coding_rules#rule_key=squid%3AUndocumentedApi is ignored, as we want to follow "clean code" guidelines and classes, methods and arguments names should be self-explanatory -->
<sonar.issue.ignore.multicriteria.UndocumentedApi.ruleKey>squid:UndocumentedApi</sonar.issue.ignore.multicriteria.UndocumentedApi.ruleKey>
<sonar.issue.ignore.multicriteria.UndocumentedApi.resourceKey>src/main/java/**/*</sonar.issue.ignore.multicriteria.UndocumentedApi.resourceKey>
<!-- Rule https://sonarqube.com/coding_rules#rule_key=Web%3ABoldAndItalicTagsCheck is ignored. Even if we agree that using the "i" tag is an awful practice, this is what is recommended by http://fontawesome.io/examples/ -->
<sonar.issue.ignore.multicriteria.BoldAndItalicTagsCheck.ruleKey>Web:BoldAndItalicTagsCheck</sonar.issue.ignore.multicriteria.BoldAndItalicTagsCheck.ruleKey>
<sonar.issue.ignore.multicriteria.BoldAndItalicTagsCheck.resourceKey>src/main/webapp/app/**/*.*</sonar.issue.ignore.multicriteria.BoldAndItalicTagsCheck.resourceKey>

<sonar.java.codeCoveragePlugin>jacoco</sonar.java.codeCoveragePlugin>
<sonar.jacoco.itReportPath>${project.testresult.directory}/coverage/jacoco/jacoco-it.exec</sonar.jacoco.itReportPath>
<sonar.jacoco.reportPath>${project.testresult.directory}/coverage/jacoco/jacoco.exec</sonar.jacoco.reportPath>
Expand Down
Expand Up @@ -17,6 +17,8 @@

/**
* Aspect for logging execution of service and repository Spring components.
*
* By default, it only runs with the "dev" profile.
*/
@Aspect
public class LoggingAspect {
Expand All @@ -26,10 +28,17 @@ public class LoggingAspect {
@Inject
private Environment env;

/**
* Pointcut that matches all repositories, services and Web REST endpoints.
*/
@Pointcut("within(io.github.jhipster.sample.repository..*) || within(io.github.jhipster.sample.service..*) || within(io.github.jhipster.sample.web.rest..*)")
public void loggingPointcut() {
// Method is empty as this is just a Poincut, the implementations are in the advices.
}

/**
* Advice that logs methods throwing exceptions.
*/
@AfterThrowing(pointcut = "loggingPointcut()", throwing = "e")
public void logAfterThrowing(JoinPoint joinPoint, Throwable e) {
if (env.acceptsProfiles(Constants.SPRING_PROFILE_DEVELOPMENT)) {
Expand All @@ -42,6 +51,9 @@ public void logAfterThrowing(JoinPoint joinPoint, Throwable e) {
}
}

/**
* Advice that logs when a method is entered and exited.
*/
@Around("loggingPointcut()")
public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable {
if (log.isDebugEnabled()) {
Expand Down
Expand Up @@ -64,7 +64,7 @@ public List<AuditEvent> find(String principal, Date after, String type) {
@Transactional(propagation = Propagation.REQUIRES_NEW)
public void add(AuditEvent event) {
if (!AUTHORIZATION_FAILURE.equals(event.getType()) &&
!ANONYMOUS_USER.equals(event.getPrincipal().toString())) {
!ANONYMOUS_USER.equals(event.getPrincipal())) {

PersistentAuditEvent persistentAuditEvent = new PersistentAuditEvent();
persistentAuditEvent.setPrincipal(event.getPrincipal());
Expand Down
Expand Up @@ -142,7 +142,7 @@ public void logout(HttpServletRequest request, HttpServletResponse response, Aut
} catch (InvalidCookieException ice) {
log.info("Invalid cookie, no persistent token could be deleted", ice);
} catch (RememberMeAuthenticationException rmae) {
log.debug("No persistent token found, so no token could be deleted");
log.debug("No persistent token found, so no token could be deleted", rmae);
}
}
super.logout(request, response, authentication);
Expand Down
@@ -1,14 +1,10 @@
package io.github.jhipster.sample.security;

import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.Collection;

/**
* Utility class for Spring Security.
*/
Expand Down
Expand Up @@ -215,7 +215,7 @@ public User getUserWithAuthorities() {
@Scheduled(cron = "0 0 0 * * ?")
public void removeOldPersistentTokens() {
LocalDate now = LocalDate.now();
persistentTokenRepository.findByTokenDateBefore(now.minusMonths(1)).stream().forEach(token -> {
persistentTokenRepository.findByTokenDateBefore(now.minusMonths(1)).forEach(token -> {
log.debug("Deleting token {}", token.getSeries());
User user = token.getUser();
user.getPersistentTokens().remove(token);
Expand Down
@@ -1,19 +1,19 @@
package io.github.jhipster.sample.web.rest;

import io.github.jhipster.sample.service.AuditEventService;

import java.time.LocalDate;
import io.github.jhipster.sample.web.rest.util.PaginationUtil;
import io.swagger.annotations.ApiParam;
import org.springframework.boot.actuate.audit.AuditEvent;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.net.URISyntaxException;
import javax.inject.Inject;
import java.net.URISyntaxException;
import java.time.LocalDate;
import java.util.List;

/**
Expand All @@ -38,7 +38,7 @@ public AuditResource(AuditEventService auditEventService) {
* @throws URISyntaxException if there is an error to generate the pagination HTTP headers
*/
@GetMapping
public ResponseEntity<List<AuditEvent>> getAll(Pageable pageable) throws URISyntaxException {
public ResponseEntity<List<AuditEvent>> getAll(@ApiParam Pageable pageable) throws URISyntaxException {
Page<AuditEvent> page = auditEventService.findAll(pageable);
HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/management/audits");
return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);
Expand All @@ -58,7 +58,7 @@ public ResponseEntity<List<AuditEvent>> getAll(Pageable pageable) throws URISynt
public ResponseEntity<List<AuditEvent>> getByDates(
@RequestParam(value = "fromDate") LocalDate fromDate,
@RequestParam(value = "toDate") LocalDate toDate,
Pageable pageable) throws URISyntaxException {
@ApiParam Pageable pageable) throws URISyntaxException {

Page<AuditEvent> page = auditEventService.findByDates(fromDate.atTime(0, 0), toDate.atTime(23, 59), pageable);
HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/management/audits");
Expand Down
Expand Up @@ -5,6 +5,7 @@

import io.github.jhipster.sample.repository.BankAccountRepository;
import io.github.jhipster.sample.web.rest.util.HeaderUtil;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpHeaders;
Expand Down
Expand Up @@ -5,6 +5,7 @@

import io.github.jhipster.sample.repository.LabelRepository;
import io.github.jhipster.sample.web.rest.util.HeaderUtil;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpHeaders;
Expand Down
Expand Up @@ -6,6 +6,8 @@
import io.github.jhipster.sample.repository.OperationRepository;
import io.github.jhipster.sample.web.rest.util.HeaderUtil;
import io.github.jhipster.sample.web.rest.util.PaginationUtil;

import io.swagger.annotations.ApiParam;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.domain.Page;
Expand Down Expand Up @@ -85,7 +87,7 @@ public ResponseEntity<Operation> updateOperation(@Valid @RequestBody Operation o
*/
@GetMapping("/operations")
@Timed
public ResponseEntity<List<Operation>> getAllOperations(Pageable pageable)
public ResponseEntity<List<Operation>> getAllOperations(@ApiParam Pageable pageable)
throws URISyntaxException {
log.debug("REST request to get a page of Operations");
Page<Operation> page = operationRepository.findAll(pageable);
Expand Down
Expand Up @@ -10,6 +10,7 @@
import io.github.jhipster.sample.web.rest.vm.ManagedUserVM;
import io.github.jhipster.sample.web.rest.util.HeaderUtil;
import io.github.jhipster.sample.web.rest.util.PaginationUtil;
import io.swagger.annotations.ApiParam;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.domain.Page;
Expand All @@ -23,7 +24,6 @@
import javax.inject.Inject;
import java.net.URI;
import java.net.URISyntaxException;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -141,7 +141,7 @@ public ResponseEntity<ManagedUserVM> updateUser(@RequestBody ManagedUserVM manag
*/
@GetMapping("/users")
@Timed
public ResponseEntity<List<ManagedUserVM>> getAllUsers(Pageable pageable)
public ResponseEntity<List<ManagedUserVM>> getAllUsers(@ApiParam Pageable pageable)
throws URISyntaxException {
Page<User> page = userRepository.findAllWithAuthorities(pageable);
List<ManagedUserVM> managedUserVMs = page.getContent().stream()
Expand Down
@@ -1,14 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">

<property name="now" value="now()" dbms="mysql,h2"/>
<property name="now" value="current_timestamp" dbms="postgresql"/>
<property name="now" value="sysdate" dbms="oracle"/>
<property name="now" value="GETDATE()" dbms="mssql"/>

<property name="autoIncrement" value="true" dbms="mysql,h2,postgresql,oracle"/>
<property name="autoIncrement" value="true" dbms="mysql,h2,postgresql,oracle,mssql"/>

<changeSet id="00000000000000" author="jhipster" dbms="postgresql,oracle">
<createSequence sequenceName="hibernate_sequence" startValue="1000" incrementBy="1"/>
Expand Down
@@ -1,17 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">

<property name="now" value="now()" dbms="mysql,h2"/>
<property name="now" value="current_timestamp" dbms="postgresql"/>
<property name="now" value="sysdate" dbms="oracle"/>
<property name="now" value="GETDATE()" dbms="mssql"/>

<property name="autoIncrement" value="true" dbms="mysql,h2,postgresql,oracle"/>
<property name="autoIncrement" value="true" dbms="mysql,h2,postgresql,oracle,mssql"/>

<property name="floatType" value="float4" dbms="postgresql, h2"/>
<property name="floatType" value="float" dbms="mysql, oracle"/>
<property name="floatType" value="float" dbms="mysql, oracle, mssql"/>

<!--
Added the entity BankAccount.
Expand Down
@@ -1,17 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">

<property name="now" value="now()" dbms="mysql,h2"/>
<property name="now" value="current_timestamp" dbms="postgresql"/>
<property name="now" value="sysdate" dbms="oracle"/>
<property name="now" value="GETDATE()" dbms="mssql"/>

<property name="autoIncrement" value="true" dbms="mysql,h2,postgresql,oracle"/>
<property name="autoIncrement" value="true" dbms="mysql,h2,postgresql,oracle,mssql"/>

<property name="floatType" value="float4" dbms="postgresql, h2"/>
<property name="floatType" value="float" dbms="mysql, oracle"/>
<property name="floatType" value="float" dbms="mysql, oracle, mssql"/>

<!--
Added the entity Label.
Expand Down
@@ -1,17 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">

<property name="now" value="now()" dbms="mysql,h2"/>
<property name="now" value="current_timestamp" dbms="postgresql"/>
<property name="now" value="sysdate" dbms="oracle"/>
<property name="now" value="GETDATE()" dbms="mssql"/>

<property name="autoIncrement" value="true" dbms="mysql,h2,postgresql,oracle"/>
<property name="autoIncrement" value="true" dbms="mysql,h2,postgresql,oracle,mssql"/>

<property name="floatType" value="float4" dbms="postgresql, h2"/>
<property name="floatType" value="float" dbms="mysql, oracle"/>
<property name="floatType" value="float" dbms="mysql, oracle, mssql"/>

<!--
Added the entity Operation.
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/app/admin/docs/docs.html
@@ -1,2 +1,2 @@
<iframe src="swagger-ui/index.html" frameborder="0" marginheight="0" marginwidth="0"
width="100%" height="900" scrolling="auto" target='_top'></iframe>
width="100%" height="900" scrolling="auto" target='_top' title="Swagger UI"></iframe>
Expand Up @@ -106,7 +106,7 @@ <h4 class="modal-title" id="myUserLabel" data-translate="userManagement.home.cre
<span class="glyphicon glyphicon-ban-circle"></span>&nbsp;<span
data-translate="entity.action.cancel">Cancel</span>
</button>
<button type="submit" ng-disabled="editForm.$invalid || isSaving" class="btn btn-primary">
<button type="submit" ng-disabled="editForm.$invalid || vm.isSaving" class="btn btn-primary">
<span class="glyphicon glyphicon-save"></span>&nbsp;<span data-translate="entity.action.save">Save</span>
</button>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/app/components/language/language.filter.js
Expand Up @@ -17,6 +17,7 @@
'el': 'Ελληνικά',
'en': 'English',
'es': 'Español',
'et': 'Eesti',
'fr': 'Français',
'gl': 'Galego',
'hu': 'Magyar',
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/app/layouts/navbar/navbar.html
Expand Up @@ -8,7 +8,7 @@
<span class="icon-bar"></span>
</button>
<a class="navbar-brand logo" href="#/" ng-click="vm.collapseNavbar()">
<img class="logo-img" src="content/images/logo-jhipster.png"/>
<img class="logo-img" src="content/images/logo-jhipster.png" alt="logo"/>
<span data-translate="global.title">JhipsterSampleApplication</span> <span class="navbar-version">v{{VERSION}}</span>
</a>
</div>
Expand Down

0 comments on commit ad0c353

Please sign in to comment.