automatic project update

This commit is contained in:
Julien Dubois 2016-09-22 23:28:17 +02:00
parent d2c4057f7a
commit df5b9b5a62
16 changed files with 63 additions and 59 deletions

View File

@ -24,9 +24,10 @@
"en"
],
"serverPort": 8080,
"jhipsterVersion": "3.7.1",
"jhipsterVersion": "3.8.0",
"enableSocialSignIn": false,
"useSass": false,
"jhiPrefix": "jhi"
"jhiPrefix": "jhi",
"messageBroker": false
}
}

View File

@ -1,4 +1,4 @@
// Generated on 2016-09-16 using generator-jhipster 3.7.1
// Generated on 2016-09-22 using generator-jhipster 3.8.0
'use strict';
var gulp = require('gulp'),

View File

@ -14,7 +14,7 @@
"eslint-config-angular": "0.5.0",
"eslint-plugin-angular": "1.3.1",
"event-stream": "3.3.4",
"generator-jhipster": "3.7.1",
"generator-jhipster": "3.8.0",
"gulp": "3.9.1",
"gulp-angular-filesort": "1.1.1",
"gulp-angular-templatecache": "2.0.0",

13
pom.xml
View File

@ -5,7 +5,7 @@
<parent>
<artifactId>spring-boot-starter-parent</artifactId>
<groupId>org.springframework.boot</groupId>
<version>1.4.0.RELEASE</version>
<version>1.4.1.RELEASE</version>
<relativePath/>
</parent>
@ -709,6 +709,15 @@
<profile.swagger>,swagger</profile.swagger>
</properties>
</profile>
<profile>
<id>shell</id>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-remote-shell</artifactId>
</dependency>
</dependencies>
</profile>
<profile>
<id>dev</id>
<activation>
@ -740,7 +749,7 @@
<!-- log configuration -->
<logback.loglevel>DEBUG</logback.loglevel>
<!-- default Spring profiles -->
<spring.profiles.active>dev,swagger${profile.no-liquibase}</spring.profiles.active>
<spring.profiles.active>dev${profile.no-liquibase}</spring.profiles.active>
</properties>
</profile>
<profile>

View File

@ -34,12 +34,12 @@ public class LoggingAspect {
public void logAfterThrowing(JoinPoint joinPoint, Throwable e) {
if (env.acceptsProfiles(Constants.SPRING_PROFILE_DEVELOPMENT)) {
log.error("Exception in {}.{}() with cause = \'{}\' and exception = \'{}\'", joinPoint.getSignature().getDeclaringTypeName(),
joinPoint.getSignature().getName(), (e.getCause() != null? e.getCause() : "NULL"), e.getMessage());
joinPoint.getSignature().getName(), e.getCause() != null? e.getCause() : "NULL", e.getMessage());
e.printStackTrace();
} else {
log.error("Exception in {}.{}() with cause = {}", joinPoint.getSignature().getDeclaringTypeName(),
joinPoint.getSignature().getName(), (e.getCause() != null? e.getCause() : "NULL"));
joinPoint.getSignature().getName(), e.getCause() != null? e.getCause() : "NULL");
}
}

View File

@ -4,7 +4,6 @@ import com.fasterxml.jackson.datatype.jsr310.ser.ZonedDateTimeSerializer;
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
@ -17,12 +16,7 @@ public class JacksonConfiguration {
@Bean
public Jackson2ObjectMapperBuilderCustomizer jacksonCustomizer() {
return new Jackson2ObjectMapperBuilderCustomizer() {
@Override
public void customize(Jackson2ObjectMapperBuilder jackson2ObjectMapperBuilder) {
jackson2ObjectMapperBuilder.serializers(new ZonedDateTimeSerializer(ISO_FIXED_FORMAT));
}
};
return jackson2ObjectMapperBuilder -> jackson2ObjectMapperBuilder.serializers(new ZonedDateTimeSerializer(ISO_FIXED_FORMAT));
}
}

View File

@ -30,7 +30,8 @@ import liquibase.integration.spring.SpringLiquibase;
*/
public class AsyncSpringLiquibase extends SpringLiquibase {
private final Logger log = LoggerFactory.getLogger(AsyncSpringLiquibase.class);
// named "logger" because there is already a field called "log" in "SpringLiquibase"
private final Logger logger = LoggerFactory.getLogger(AsyncSpringLiquibase.class);
@Inject
@Qualifier("taskExecutor")
@ -45,18 +46,18 @@ public class AsyncSpringLiquibase extends SpringLiquibase {
if (env.acceptsProfiles(Constants.SPRING_PROFILE_DEVELOPMENT, Constants.SPRING_PROFILE_HEROKU)) {
taskExecutor.execute(() -> {
try {
log.warn("Starting Liquibase asynchronously, your database might not be ready at startup!");
logger.warn("Starting Liquibase asynchronously, your database might not be ready at startup!");
initDb();
} catch (LiquibaseException e) {
log.error("Liquibase could not start correctly, your database is NOT ready: {}", e.getMessage(), e);
logger.error("Liquibase could not start correctly, your database is NOT ready: {}", e.getMessage(), e);
}
});
} else {
log.debug("Starting Liquibase synchronously");
logger.debug("Starting Liquibase synchronously");
initDb();
}
} else {
log.debug("Liquibase is disabled");
logger.debug("Liquibase is disabled");
}
}
@ -65,6 +66,6 @@ public class AsyncSpringLiquibase extends SpringLiquibase {
watch.start();
super.afterPropertiesSet();
watch.stop();
log.debug("Started Liquibase in {} ms", watch.getTotalTimeMillis());
logger.debug("Started Liquibase in {} ms", watch.getTotalTimeMillis());
}
}

View File

@ -201,9 +201,13 @@ public class UserService {
@Transactional(readOnly = true)
public User getUserWithAuthorities() {
User user = userRepository.findOneByLogin(SecurityUtils.getCurrentUserLogin()).get();
user.getAuthorities().size(); // eagerly load the association
return user;
Optional<User> optionalUser = userRepository.findOneByLogin(SecurityUtils.getCurrentUserLogin());
User user = null;
if (optionalUser.isPresent()) {
user = optionalUser.get();
user.getAuthorities().size(); // eagerly load the association
}
return user;
}
/**

View File

@ -13,7 +13,7 @@
spring:
profiles:
active: dev,swagger
include: swagger
devtools:
restart:
enabled: true

View File

@ -16,7 +16,6 @@ management:
health:
mail:
enabled: false # When using the MailService, configure an SMTP server and set this to true
spring:
application:
name: jhipsterSampleApplication

View File

@ -38,28 +38,28 @@
</cache>
<cache name="io.github.jhipster.sample.domain.BankAccount"
timeToLiveSeconds="3600">
</cache>
timeToLiveSeconds="3600">
</cache>
<cache name="io.github.jhipster.sample.domain.BankAccount.operations"
timeToLiveSeconds="3600">
</cache>
timeToLiveSeconds="3600">
</cache>
<cache name="io.github.jhipster.sample.domain.Label"
timeToLiveSeconds="3600">
</cache>
timeToLiveSeconds="3600">
</cache>
<cache name="io.github.jhipster.sample.domain.Label.operations"
timeToLiveSeconds="3600">
</cache>
timeToLiveSeconds="3600">
</cache>
<cache name="io.github.jhipster.sample.domain.Operation"
timeToLiveSeconds="3600">
</cache>
timeToLiveSeconds="3600">
</cache>
<cache name="io.github.jhipster.sample.domain.Operation.labels"
timeToLiveSeconds="3600">
</cache>
timeToLiveSeconds="3600">
</cache>
<!-- jhipster-needle-ehcache-add-entry -->
</ehcache>

View File

@ -60,7 +60,7 @@
},
getColor: function (s) {
var idx = 0;
var idx;
if (s <= 10) {
idx = 0;
}

View File

@ -22,7 +22,7 @@
vm.alerts = [];
function addErrorAlert (message, key, data) {
key = key && key !== null ? key : message;
key = key ? key : message;
vm.alerts.push(
AlertService.add(
{

View File

@ -22,8 +22,8 @@
function encode (input) {
var output = '',
chr1, chr2, chr3 = '',
enc1, enc2, enc3, enc4 = '',
chr1, chr2, chr3,
enc1, enc2, enc3, enc4,
i = 0;
while (i < input.length) {
@ -47,8 +47,6 @@
keyStr.charAt(enc2) +
keyStr.charAt(enc3) +
keyStr.charAt(enc4);
chr1 = chr2 = chr3 = '';
enc1 = enc2 = enc3 = enc4 = '';
}
return output;
@ -56,8 +54,8 @@
function decode (input) {
var output = '',
chr1, chr2, chr3 = '',
enc1, enc2, enc3, enc4 = '',
chr1, chr2, chr3,
enc1, enc2, enc3, enc4,
i = 0;
// remove all characters that are not A-Z, a-z, 0-9, +, /, or =
@ -81,9 +79,6 @@
if (enc4 !== 64) {
output = output + String.fromCharCode(chr3);
}
chr1 = chr2 = chr3 = '';
enc1 = enc2 = enc3 = enc4 = '';
}
return output;

View File

@ -11,8 +11,9 @@
function capitalizeFilter (input) {
if (input !== null) {
input = input.toLowerCase();
input = input.substring(0, 1).toUpperCase() + input.substring(1)
}
return input.substring(0, 1).toUpperCase() + input.substring(1);
return input;
}
}
})();

View File

@ -32,19 +32,19 @@
</span>
</a>
<ul class="dropdown-menu" uib-dropdown-menu>
<li ui-sref-active="active" >
<li ui-sref-active="active">
<a ui-sref="bank-account" ng-click="vm.collapseNavbar()">
<span class="glyphicon glyphicon-asterisk"></span>&nbsp;
<span data-translate="global.menu.entities.bankAccount">Bank Account</span>
</a>
</li>
<li ui-sref-active="active" >
<li ui-sref-active="active">
<a ui-sref="label" ng-click="vm.collapseNavbar()">
<span class="glyphicon glyphicon-asterisk"></span>&nbsp;
<span data-translate="global.menu.entities.label">Label</span>
</a>
</li>
<li ui-sref-active="active" >
<li ui-sref-active="active">
<a ui-sref="operation" ng-click="vm.collapseNavbar()">
<span class="glyphicon glyphicon-asterisk"></span>&nbsp;
<span data-translate="global.menu.entities.operation">Operation</span>