automatic project update

This commit is contained in:
Julien Dubois 2017-02-21 18:21:25 +01:00
parent e1843b8dcb
commit 6540c57b44
16 changed files with 168 additions and 180 deletions

View File

@ -24,7 +24,7 @@
"en"
],
"serverPort": 8080,
"jhipsterVersion": "4.0.5",
"jhipsterVersion": "4.0.6",
"enableSocialSignIn": false,
"useSass": false,
"jhiPrefix": "jhi",

View File

@ -1,5 +1,5 @@
# jhipsterSampleApplication
This application was generated using JHipster 4.0.4, you can find documentation and help at [https://jhipster.github.io/documentation-archive/v4.0.4](https://jhipster.github.io/documentation-archive/v4.0.4).
This application was generated using JHipster 4.0.6, you can find documentation and help at [https://jhipster.github.io/documentation-archive/v4.0.6](https://jhipster.github.io/documentation-archive/v4.0.6).
## Development
@ -96,13 +96,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 4.0.4 archive]: https://jhipster.github.io/documentation-archive/v4.0.4
[JHipster 4.0.6 archive]: https://jhipster.github.io/documentation-archive/v4.0.6
[Using JHipster in development]: https://jhipster.github.io/documentation-archive/v4.0.4/development/
[Using Docker and Docker-Compose]: https://jhipster.github.io/documentation-archive/v4.0.4/docker-compose
[Using JHipster in production]: https://jhipster.github.io/documentation-archive/v4.0.4/production/
[Running tests page]: https://jhipster.github.io/documentation-archive/v4.0.4/running-tests/
[Setting up Continuous Integration]: https://jhipster.github.io/documentation-archive/v4.0.4/setting-up-ci/
[Using JHipster in development]: https://jhipster.github.io/documentation-archive/v4.0.6/development/
[Using Docker and Docker-Compose]: https://jhipster.github.io/documentation-archive/v4.0.6/docker-compose
[Using JHipster in production]: https://jhipster.github.io/documentation-archive/v4.0.6/production/
[Running tests page]: https://jhipster.github.io/documentation-archive/v4.0.6/running-tests/
[Setting up Continuous Integration]: https://jhipster.github.io/documentation-archive/v4.0.6/setting-up-ci/
[Gatling]: http://gatling.io/
[Node.js]: https://nodejs.org/

View File

@ -1,4 +1,4 @@
// Generated on 2017-02-17 using generator-jhipster 4.0.5
// Generated on 2017-02-21 using generator-jhipster 4.0.6
'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": "4.0.5",
"generator-jhipster": "4.0.6",
"gulp": "3.9.1",
"gulp-angular-filesort": "1.1.1",
"gulp-angular-templatecache": "2.0.0",

75
pom.xml
View File

@ -5,7 +5,7 @@
<parent>
<artifactId>spring-boot-starter-parent</artifactId>
<groupId>org.springframework.boot</groupId>
<version>1.4.4.RELEASE</version>
<version>1.5.1.RELEASE</version>
<relativePath />
</parent>
@ -16,44 +16,50 @@
<name>Jhipster Sample Application</name>
<prerequisites>
<maven>3.0.0</maven>
<maven>${maven.version}</maven>
</prerequisites>
<properties>
<argLine>-Djava.security.egd=file:/dev/./urandom -Xmx256m</argLine>
<assertj-core.version>3.5.2</assertj-core.version>
<awaitility.version>1.7.0</awaitility.version>
<assertj.version>3.6.2</assertj.version>
<awaitility.version>2.0.0</awaitility.version>
<commons-io.version>2.5</commons-io.version>
<commons-lang.version>3.4</commons-lang.version>
<commons-lang.version>3.5</commons-lang.version>
<docker-maven-plugin.version>0.4.13</docker-maven-plugin.version>
<frontend-maven-plugin.version>1.3</frontend-maven-plugin.version>
<gatling-maven-plugin.version>2.2.0</gatling-maven-plugin.version>
<gatling.version>2.2.0</gatling.version>
<hibernate-validator.version>5.3.3.Final</hibernate-validator.version>
<hibernate.version>5.2.4.Final</hibernate.version>
<hikaricp.version>2.4.6</hikaricp.version>
<gatling.version>2.2.3</gatling.version>
<gatling-maven-plugin.version>2.2.1</gatling-maven-plugin.version>
<hibernate.version>5.2.7.Final</hibernate.version>
<hikaricp.version>2.6.0</hikaricp.version>
<jacoco-maven-plugin.version>0.7.9</jacoco-maven-plugin.version>
<java.version>1.8</java.version>
<javassist.version>3.21.0-GA</javassist.version>
<jcache.version>1.0.0</jcache.version>
<jhipster.server.version>1.0.2</jhipster.server.version>
<jzlib.version>1.1.3</jzlib.version>
<jhipster.server.version>1.0.4</jhipster.server.version>
<liquibase-hibernate5.version>3.6</liquibase-hibernate5.version>
<liquibase-slf4j.version>2.0.0</liquibase-slf4j.version>
<liquibase.version>3.5.3</liquibase.version>
<logstash-logback-encoder.version>4.7</logstash-logback-encoder.version>
<logstash-logback-encoder.version>4.8</logstash-logback-encoder.version>
<m2e.apt.activation>jdt_apt</m2e.apt.activation>
<mapstruct.version>1.1.0.Final</mapstruct.version>
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
<maven-enforcer-plugin.version>1.4.1</maven-enforcer-plugin.version>
<maven-resources-plugin.version>3.0.1</maven-resources-plugin.version>
<maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.version>3.0.0</maven.version>
<metrics-spring.version>3.1.3</metrics-spring.version>
<node.version>v6.9.5</node.version>
<!-- These remain empty unless the corresponding profile is active -->
<profile.no-liquibase />
<profile.swagger />
<prometheus-simpleclient.version>0.0.20</prometheus-simpleclient.version>
<!-- Sonar properties -->
<project.testresult.directory>${project.build.directory}/test-results</project.testresult.directory>
<run.addResources>false</run.addResources>
<scala-maven-plugin.version>3.2.2</scala-maven-plugin.version>
<scala.version>2.12.1</scala.version>
<sonar-maven-plugin.version>3.2</sonar-maven-plugin.version>
<sonar.exclusions>src/main/webapp/content/**/*.*, src/main/webapp/bower_components/**/*.*, src/main/webapp/i18n/*.js, target/www/**/*.*</sonar.exclusions>
@ -88,7 +94,8 @@
<!-- Spring properties -->
<springfox.version>2.6.1</springfox.version>
<undertow.version>1.4.10.Final</undertow.version>
<yarn.version>v0.19.1</yarn.version>
<validation-api.version>1.1.0.Final</validation-api.version>
<yarn.version>v0.20.3</yarn.version>
</properties>
@ -107,11 +114,6 @@
<artifactId>metrics-annotation</artifactId>
<version>${dropwizard-metrics.version}</version>
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-healthchecks</artifactId>
<version>${dropwizard-metrics.version}</version>
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-json</artifactId>
@ -130,12 +132,6 @@
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-servlets</artifactId>
<exclusions>
<exclusion>
<artifactId>metrics-healthchecks</artifactId>
<groupId>io.dropwizard.metrics</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
@ -144,7 +140,6 @@
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-hppc</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
@ -153,14 +148,13 @@
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-json-org</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>com.jayway.awaitility</groupId>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<version>${awaitility.version}</version>
<scope>test</scope>
@ -241,12 +235,11 @@
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jzlib</artifactId>
<version>1.1.2</version>
<version>${jzlib.version}</version>
</dependency>
<dependency>
<groupId>javax.cache</groupId>
<artifactId>cache-api</artifactId>
<version>${jcache.version}</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
@ -255,7 +248,6 @@
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj-core.version}</version>
<scope>test</scope>
</dependency>
<dependency>
@ -274,7 +266,6 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate-validator.version}</version>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
@ -437,7 +428,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<annotationProcessorPaths>
<path>
@ -471,8 +462,8 @@
<configuration>
<rules>
<requireMavenVersion>
<message>You are running an older version of Maven. JHipster requires at least Maven 3.0</message>
<version>[3.0.0,)</version>
<message>You are running an older version of Maven. JHipster requires at least Maven ${maven.version}</message>
<version>[${maven.version},)</version>
</requireMavenVersion>
<requireJavaVersion>
<message>You are running an older version of Java. JHipster requires at least JDK ${java.version}</message>
@ -582,7 +573,7 @@
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.18.2-GA</version>
<version>${javassist.version}</version>
</dependency>
<dependency>
<groupId>org.liquibase.ext</groupId>
@ -597,7 +588,7 @@
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
<version>${validation-api.version}</version>
</dependency>
</dependencies>
</plugin>
@ -616,7 +607,7 @@
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.10</version>
<version>${docker-maven-plugin.version}</version>
<configuration>
<imageName>jhipstersampleapplication</imageName>
<dockerDirectory>src/main/docker</dockerDirectory>
@ -744,7 +735,6 @@
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<configuration>
<filesets>
<fileset>
@ -898,7 +888,7 @@
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.2.2</version>
<version>${scala-maven-plugin.version}</version>
<executions>
<execution>
<id>compile</id>
@ -920,7 +910,7 @@
<configuration>
<recompileMode>incremental</recompileMode>
<verbose>true</verbose>
<scalaVersion>2.11.7</scalaVersion>
<scalaVersion>${scala.version}</scalaVersion>
</configuration>
</plugin>
</plugins>
@ -949,9 +939,6 @@
Profile for monitoring the application with Prometheus.
-->
<id>prometheus</id>
<properties>
<prometheus-simpleclient.version>0.0.18</prometheus-simpleclient.version>
</properties>
<dependencies>
<dependency>
<groupId>io.prometheus</groupId>

View File

@ -9,6 +9,7 @@ public final class Constants {
public static final String LOGIN_REGEX = "^[_'.@A-Za-z0-9-]*$";
public static final String SYSTEM_ACCOUNT = "system";
public static final String ANONYMOUS_USER = "anonymoususer";
private Constants() {
}

View File

@ -1,5 +1,6 @@
package io.github.jhipster.sample.repository;
import io.github.jhipster.sample.config.Constants;
import io.github.jhipster.sample.config.audit.AuditEventConverter;
import io.github.jhipster.sample.domain.PersistentAuditEvent;
@ -23,8 +24,6 @@ public class CustomAuditEventRepository implements AuditEventRepository {
private static final String AUTHORIZATION_FAILURE = "AUTHORIZATION_FAILURE";
private static final String ANONYMOUS_USER = "anonymoususer";
private final PersistenceAuditEventRepository persistenceAuditEventRepository;
private final AuditEventConverter auditEventConverter;
@ -68,7 +67,7 @@ public class CustomAuditEventRepository implements AuditEventRepository {
@Transactional(propagation = Propagation.REQUIRES_NEW)
public void add(AuditEvent event) {
if (!AUTHORIZATION_FAILURE.equals(event.getType()) &&
!ANONYMOUS_USER.equals(event.getPrincipal())) {
!Constants.ANONYMOUS_USER.equals(event.getPrincipal())) {
PersistentAuditEvent persistentAuditEvent = new PersistentAuditEvent();
persistentAuditEvent.setPrincipal(event.getPrincipal());

View File

@ -3,6 +3,8 @@ package io.github.jhipster.sample.repository;
import io.github.jhipster.sample.domain.User;
import java.time.ZonedDateTime;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaRepository;
@ -29,4 +31,6 @@ public interface UserRepository extends JpaRepository<User, Long> {
@EntityGraph(attributePaths = "authorities")
Optional<User> findOneWithAuthoritiesByLogin(String login);
Page<User> findAllByLoginNot(Pageable pageable, String login);
}

View File

@ -4,6 +4,7 @@ import io.github.jhipster.sample.domain.Authority;
import io.github.jhipster.sample.domain.User;
import io.github.jhipster.sample.repository.AuthorityRepository;
import io.github.jhipster.sample.repository.PersistentTokenRepository;
import io.github.jhipster.sample.config.Constants;
import io.github.jhipster.sample.repository.UserRepository;
import io.github.jhipster.sample.security.AuthoritiesConstants;
import io.github.jhipster.sample.security.SecurityUtils;
@ -195,7 +196,7 @@ public class UserService {
@Transactional(readOnly = true)
public Page<UserDTO> getAllManagedUsers(Pageable pageable) {
return userRepository.findAll(pageable).map(UserDTO::new);
return userRepository.findAllByLoginNot(pageable, Constants.ANONYMOUS_USER).map(UserDTO::new);
}
@Transactional(readOnly = true)

View File

@ -44,7 +44,7 @@ spring:
hibernate.cache.region.factory_class: io.github.jhipster.config.jcache.SpringCacheRegionFactory
cache:
jcache:
config: config/ehcache/ehcache-dev.xml
config: config/ehcache/ehcache-prod.xml
mail:
host: localhost
port: 25

View File

@ -15,6 +15,8 @@
# ===================================================================
management:
security:
roles: ADMIN
context-path: /management
health:
mail:

View File

@ -51,16 +51,8 @@
}
function onSuccess(data, headers) {
//hide anonymous user from user management: it's a required user for Spring Security
var hiddenUsersSize = 0;
for (var i in data) {
if (data[i]['login'] === 'anonymoususer') {
data.splice(i, 1);
hiddenUsersSize++;
}
}
vm.links = ParseLinks.parse(headers('link'));
vm.totalItems = headers('X-Total-Count') - hiddenUsersSize;
vm.totalItems = headers('X-Total-Count');
vm.queryCount = vm.totalItems;
vm.page = pagingParams.page;
vm.users = data;

View File

@ -10,8 +10,10 @@ gatling {
#runDescription = "" # The description for this simulation run, displayed in each report
#encoding = "utf-8" # Encoding to use throughout Gatling for file and string manipulation
#simulationClass = "" # The FQCN of the simulation to run (when used in conjunction with noReports, the simulation for which assertions will be validated)
#disableCompiler = false # When set to true, skip compiling and load an already compiled simulation (used in conjunction with simulationClass)
#mute = false # When set to true, don't ask for simulation name nor run description (currently only used by Gatling SBT plugin)
#elFileBodiesCacheMaxCapacity = 200 # Cache size for request body EL templates, set to 0 to disable
#rawFileBodiesCacheMaxCapacity = 200 # Cache size for request body Raw templates, set to 0 to disable
#rawFileBodiesInMemoryMaxSize = 1000 # Below this limit, raw file bodies will be cached in memory
extract {
regex {
@ -23,131 +25,107 @@ gatling {
jsonPath {
#cacheMaxCapacity = 200 # Cache size for the compiled jsonPath queries, set to 0 to disable caching
#preferJackson = false # When set to true, prefer Jackson over Boon for JSON-related operations
jackson {
#allowComments = false # Allow comments in JSON files
#allowUnquotedFieldNames = false # Allow unquoted JSON fields names
#allowSingleQuotes = false # Allow single quoted JSON field names
}
}
css {
#cacheMaxCapacity = 200 # Cache size for the compiled CSS selectors queries, set to 0 to disable caching
}
}
timeOut {
#simulation = 8640000 # Absolute timeout, in seconds, of a simulation
}
directory {
#data = user-files/data # Folder where user's data (e.g. files used by Feeders) is located
#requestBodies = user-files/request-bodies # Folder where request bodies are located
#simulations = user-files/simulations # Folder where the bundle's simulations are located
#reportsOnly = "" # If set, name of report folder to look for in order to generate its report
#binaries = "" # If set, name of the folder where compiles classes are located
#results = results # Name of the folder where all reports folder are located
}
zinc {
#jvmArgs = "-Xss10M" # JVM args passed to Zinc (in charge of compiling Gatling Simulations)
#data = user-files/data # Folder where user's data (e.g. files used by Feeders) is located
#bodies = user-files/bodies # Folder where bodies are located
#simulations = user-files/simulations # Folder where the bundle's simulations are located
#reportsOnly = "" # If set, name of report folder to look for in order to generate its report
#binaries = "" # If set, name of the folder where compiles classes are located: Defaults to GATLING_HOME/target.
#results = results # Name of the folder where all reports folder are located
}
}
charting {
#noReports = false # When set to true, don't generate HTML reports
#maxPlotPerSeries = 1000 # Number of points per graph in Gatling reports
#accuracy = 10 # Accuracy, in milliseconds, of the report's stats
#useGroupDurationMetric = false # Switch group timings from cumulated response time to group duration.
indicators {
#lowerBound = 800 # Lower bound for the requests' response time to track in the reports and the console summary
#higherBound = 1200 # Higher bound for the requests' response time to track in the reports and the console summary
#percentile1 = 95 # Value for the first percentile to track in the reports, the console summary and GraphiteDataWriter
#percentile2 = 99 # Value for the second percentile to track in the reports, the console summary and GraphiteDataWriter
#percentile1 = 50 # Value for the 1st percentile to track in the reports, the console summary and Graphite
#percentile2 = 75 # Value for the 2nd percentile to track in the reports, the console summary and Graphite
#percentile3 = 95 # Value for the 3rd percentile to track in the reports, the console summary and Graphite
#percentile4 = 99 # Value for the 4th percentile to track in the reports, the console summary and Graphite
}
}
http {
#elFileBodiesCacheMaxCapacity = 200 # Cache size for request body EL templates, set to 0 to disable
#rawFileBodiesCacheMaxCapacity = 200 # Cache size for request body Raw templates, set to 0 to disable
#fetchedCssCacheMaxCapacity = 200 # Cache size for CSS parsed content, set to 0 to disable
#fetchedHtmlCacheMaxCapacity = 200 # Cache size for HTML parsed content, set to 0 to disable
#redirectPerUserCacheMaxCapacity = 200 # Per virtual user cache size for permanent redirects, set to 0 to disable
#expirePerUserCacheMaxCapacity = 200 # Per virtual user cache size for permanent 'Expire' headers, set to 0 to disable
#lastModifiedPerUserCacheMaxCapacity = 200 # Per virtual user cache size for permanent 'Last-Modified' headers, set to 0 to disable
#etagPerUserCacheMaxCapacity = 200 # Per virtual user cache size for permanent ETag headers, set to 0 to disable
#warmUpUrl = "http://goo.gl/pq1Xwu" # The URL to use to warm-up the HTTP stack (blank means disabled)
#perUserCacheMaxCapacity = 200 # Per virtual user cache size, set to 0 to disable
#warmUpUrl = "http://gatling.io" # The URL to use to warm-up the HTTP stack (blank means disabled)
#enableGA = true # Very light Google Analytics, please support
ssl {
trustStore {
#type = "" # Type of SSLContext's TrustManagers store
#file = "" # Location of SSLContext's TrustManagers store
#password = "" # Password for SSLContext's TrustManagers store
#algorithm = "" # Algorithm used by SSLContext's TrustManagers store
}
keyStore {
#type = "" # Type of SSLContext's KeyManagers store
#file = "" # Location of SSLContext's KeyManagers store
#password = "" # Password for SSLContext's KeyManagers store
#algorithm = "" # Algorithm used SSLContext's KeyManagers store
}
trustStore {
#type = "" # Type of SSLContext's TrustManagers store
#file = "" # Location of SSLContext's TrustManagers store
#password = "" # Password for SSLContext's TrustManagers store
#algorithm = "" # Algorithm used by SSLContext's TrustManagers store
}
}
ahc {
#allowPoolingConnections = true # Allow pooling HTTP connections (keep-alive header automatically added)
#allowPoolingSslConnections = true # Allow pooling HTTPS connections (keep-alive header automatically added)
#compressionEnforced = false # Enforce gzip/deflate when Accept-Encoding header is not defined
#connectTimeout = 60000 # Timeout when establishing a connection
#pooledConnectionIdleTimeout = 60000 # Timeout when a connection stays unused in the pool
#readTimeout = 60000 # Timeout when a used connection stays idle
#connectionTTL = -1 # Max duration a connection can stay open (-1 means no limit)
#ioThreadMultiplier = 2 # Number of Netty worker threads per core
#maxConnectionsPerHost = -1 # Max number of connections per host (-1 means no limit)
#maxConnections = -1 # Max number of connections (-1 means no limit)
#maxRetry = 0 # Number of times that a request should be tried again
#requestTimeout = 60000 # Timeout of the requests
#useProxyProperties = false # When set to true, supports standard Proxy System properties
#webSocketTimeout = 60000 # Timeout when a used websocket connection stays idle
#useRelativeURIsWithConnectProxies = true # When set to true, use relative URIs when talking with an SSL proxy or a WebSocket proxy
#acceptAnyCertificate = true # When set to true, doesn't validate SSL certificates
#httpClientCodecMaxInitialLineLength = 4096 # Maximum length of the initial line of the response (e.g. "HTTP/1.0 200 OK")
#httpClientCodecMaxHeaderSize = 8192 # Maximum size, in bytes, of each request's headers
#httpClientCodecMaxChunkSize = 8192 # Maximum length of the content or each chunk
#keepEncodingHeader = true # Don't drop Encoding response header after decoding
#webSocketMaxFrameSize = 10240 # Maximum frame payload size
#keepAlive = true # Allow pooling HTTP connections (keep-alive header automatically added)
#connectTimeout = 10000 # Timeout when establishing a connection
#handshakeTimeout = 10000 # Timeout when performing TLS hashshake
#pooledConnectionIdleTimeout = 60000 # Timeout when a connection stays unused in the pool
#readTimeout = 60000 # Timeout when a used connection stays idle
#maxRetry = 2 # Number of times that a request should be tried again
#requestTimeout = 60000 # Timeout of the requests
#acceptAnyCertificate = true # When set to true, doesn't validate SSL certificates
#httpClientCodecMaxInitialLineLength = 4096 # Maximum length of the initial line of the response (e.g. "HTTP/1.0 200 OK")
#httpClientCodecMaxHeaderSize = 8192 # Maximum size, in bytes, of each request's headers
#httpClientCodecMaxChunkSize = 8192 # Maximum length of the content or each chunk
#webSocketMaxFrameSize = 10240000 # Maximum frame payload size
#sslEnabledProtocols = [TLSv1.2, TLSv1.1, TLSv1] # Array of enabled protocols for HTTPS, if empty use the JDK defaults
#sslEnabledCipherSuites = [] # Array of enabled cipher suites for HTTPS, if empty use the AHC defaults
#sslSessionCacheSize = 0 # SSLSession cache size, set to 0 to use JDK's default
#sslSessionTimeout = 0 # SSLSession timeout in seconds, set to 0 to use JDK's default (24h)
#useOpenSsl = false # if OpenSSL should be used instead of JSSE (requires tcnative jar)
#useNativeTransport = false # if native transport should be used instead of Java NIO (requires netty-transport-native-epoll, currently Linux only)
#tcpNoDelay = true
#soReuseAddress = false
#soLinger = -1
#soSndBuf = -1
#soRcvBuf = -1
#allocator = "pooled" # switch to unpooled for unpooled ByteBufAllocator
#maxThreadLocalCharBufferSize = 200000 # Netty's default is 16k
}
dns {
#queryTimeout = 5000 # Timeout of each DNS query in millis
#maxQueriesPerResolve = 6 # Maximum allowed number of DNS queries for a given name resolution
}
}
jms {
#acknowledgedMessagesBufferSize = 5000 # size of the buffer used to tracked acknowledged messages and protect against duplicate receives
}
data {
#writers = "console, file" # The lists of DataWriters to which Gatling write simulation data (currently supported : "console", "file", "graphite", "jdbc")
#reader = file # The DataReader used by the charting engine for reading simulation results
#writers = [console, file] # The list of DataWriters to which Gatling write simulation data (currently supported : console, file, graphite, jdbc)
console {
#light = false # When set to true, displays a light version without detailed request stats
#light = false # When set to true, displays a light version without detailed request stats
}
file {
#bufferSize = 8192 # FileDataWriter's internal data buffer size, in bytes
#bufferSize = 8192 # FileDataWriter's internal data buffer size, in bytes
}
leak {
#noActivityTimeout = 30 # Period, in seconds, for which Gatling may have no activity before considering a leak may be happening
}
jdbc {
db {
#url = "jdbc:mysql://localhost:3306/temp" # The JDBC URL used by the JDBC DataWriter
#username = "root" # The database user used by the JDBC DataWriter
#password = "123123q" # The password for the specified user
}
#bufferSize = 20 # The size for each batch of SQL inserts to send to the database
create {
#createRunRecordTable = "CREATE TABLE IF NOT EXISTS `RunRecords` ( `id` INT NOT NULL AUTO_INCREMENT , `runDate` DATETIME NULL , `simulationId` VARCHAR(45) NULL , `runDescription` VARCHAR(45) NULL , PRIMARY KEY (`id`) )"
#createRequestRecordTable = "CREATE TABLE IF NOT EXISTS `RequestRecords` (`id` int(11) NOT NULL AUTO_INCREMENT, `runId` int DEFAULT NULL, `scenario` varchar(45) DEFAULT NULL, `userId` VARCHAR(20) NULL, `name` varchar(50) DEFAULT NULL, `requestStartDate` bigint DEFAULT NULL, `requestEndDate` bigint DEFAULT NULL, `responseStartDate` bigint DEFAULT NULL, `responseEndDate` bigint DEFAULT NULL, `status` varchar(2) DEFAULT NULL, `message` varchar(4500) DEFAULT NULL, `responseTime` bigint DEFAULT NULL, PRIMARY KEY (`id`) )"
#createScenarioRecordTable = "CREATE TABLE IF NOT EXISTS `ScenarioRecords` (`id` int(11) NOT NULL AUTO_INCREMENT, `runId` int DEFAULT NULL, `scenarioName` varchar(45) DEFAULT NULL, `userId` VARCHAR(20) NULL, `event` varchar(50) DEFAULT NULL, `startDate` bigint DEFAULT NULL, `endDate` bigint DEFAULT NULL, PRIMARY KEY (`id`) )"
#createGroupRecordTable = "CREATE TABLE IF NOT EXISTS `GroupRecords` (`id` int(11) NOT NULL AUTO_INCREMENT, `runId` int DEFAULT NULL, `scenarioName` varchar(45) DEFAULT NULL, `userId` VARCHAR(20) NULL, `entryDate` bigint DEFAULT NULL, `exitDate` bigint DEFAULT NULL, `status` varchar(2) DEFAULT NULL, PRIMARY KEY (`id`) )"
}
insert {
#insertRunRecord = "INSERT INTO RunRecords (runDate, simulationId, runDescription) VALUES (?,?,?)"
#insertRequestRecord = "INSERT INTO RequestRecords (runId, scenario, userId, name, requestStartDate, requestEndDate, responseStartDate, responseEndDate, status, message, responseTime) VALUES (?,?,?,?,?,?,?,?,?,?,?)"
#insertScenarioRecord = "INSERT INTO ScenarioRecords (runId, scenarioName, userId, event, startDate, endDate) VALUES (?,?,?,?,?,?)"
#insertGroupRecord = "INSERT INTO GroupRecords (runId, scenarioName, userId, entryDate, exitDate, status) VALUES (?,?,?,?,?,?)"
}
}
graphite {
#light = false # only send the all* stats
#host = "localhost" # The host where the Carbon server is located
#port = 2003 # The port to which the Carbon server listens to
#port = 2003 # The port to which the Carbon server listens to (2003 is default for plaintext, 2004 is default for pickle)
#protocol = "tcp" # The protocol used to send data to Carbon (currently supported : "tcp", "udp")
#rootPathPrefix = "gatling" # The common prefix of all metrics sent to Graphite
#bufferSize = 8192 # GraphiteDataWriter's internal data buffer size, in bytes
#writeInterval = 1 # GraphiteDataWriter's write interval, in seconds
}
}
}

View File

@ -4,7 +4,9 @@ import io.github.jhipster.sample.JhipsterSampleApplicationApp;
import io.github.jhipster.sample.domain.PersistentToken;
import io.github.jhipster.sample.domain.User;
import io.github.jhipster.sample.repository.PersistentTokenRepository;
import io.github.jhipster.sample.config.Constants;
import io.github.jhipster.sample.repository.UserRepository;
import io.github.jhipster.sample.service.dto.UserDTO;
import java.time.ZonedDateTime;
import io.github.jhipster.sample.service.util.RandomUtil;
import java.time.LocalDate;
@ -15,6 +17,8 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import java.util.Optional;
import java.util.List;
@ -142,4 +146,13 @@ public class UserServiceIntTest {
token.setUserAgent("Test agent");
persistentTokenRepository.saveAndFlush(token);
}
@Test
public void assertThatAnonymousUserIsNotGet() {
final PageRequest pageable = new PageRequest(0, (int) userRepository.count());
final Page<UserDTO> allManagedUsers = userService.getAllManagedUsers(pageable);
assertThat(allManagedUsers.getContent().stream()
.noneMatch(user -> Constants.ANONYMOUS_USER.equals(user.getLogin())))
.isTrue();
}
}

View File

@ -68,7 +68,7 @@ public class AccountResourceIntTest {
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
doNothing().when(mockMailService).sendActivationEmail((User) anyObject());
doNothing().when(mockMailService).sendActivationEmail(anyObject());
AccountResource accountResource =
new AccountResource(userRepository, userService, mockMailService, persistentTokenRepository);

View File

@ -1477,7 +1477,11 @@ ee-first@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
ejs@2.5.1, ejs@^2.3.1:
ejs@2.5.6:
version "2.5.6"
resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.5.6.tgz#479636bfa3fe3b1debd52087f0acb204b4f19c88"
ejs@^2.3.1:
version "2.5.1"
resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.5.1.tgz#dbc0ac40812d3b451dad063fcd369e4e47d80287"
@ -1752,6 +1756,10 @@ esprima@^1.2.2:
version "1.2.5"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.2.5.tgz#0993502feaf668138325756f30f9a51feeec11e9"
esprima@^3.1.1:
version "3.1.3"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633"
esprima@~3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.0.0.tgz#53cf247acda77313e551c3aa2e73342d3fb4f7d9"
@ -2248,24 +2256,24 @@ generate-object-property@^1.1.0:
dependencies:
is-property "^1.0.0"
generator-jhipster@4.0.5:
version "4.0.5"
resolved "https://registry.yarnpkg.com/generator-jhipster/-/generator-jhipster-4.0.5.tgz#942241732128bf97af4d07b15f1e194376fbfa7c"
generator-jhipster@4.0.6:
version "4.0.6"
resolved "https://registry.yarnpkg.com/generator-jhipster/-/generator-jhipster-4.0.6.tgz#d1b17cabf52af5117a2466fdf9415b7bee572bb0"
dependencies:
chalk "1.1.3"
cheerio "0.22.0"
ejs "2.5.1"
glob "7.0.6"
ejs "2.5.6"
glob "7.1.1"
html-wiring "1.2.0"
insight "0.8.4"
jhipster-core "1.2.8"
js-yaml "3.6.1"
lodash "4.15.0"
js-yaml "3.8.1"
lodash "4.17.4"
mkdirp "0.5.1"
pluralize "3.0.0"
pluralize "3.1.0"
randexp "0.4.4"
semver "5.3.0"
shelljs "0.7.4"
shelljs "0.7.6"
yeoman-generator "0.24.1"
yo "1.8.5"
@ -2379,9 +2387,9 @@ glob2base@^0.0.12:
dependencies:
find-index "^0.1.1"
glob@7.0.6, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6:
version "7.0.6"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a"
glob@7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
@ -2426,6 +2434,17 @@ glob@^6.0.1:
once "^1.3.0"
path-is-absolute "^1.0.0"
glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6:
version "7.0.6"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a"
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^3.0.2"
once "^1.3.0"
path-is-absolute "^1.0.0"
glob@~3.1.21:
version "3.1.21"
resolved "https://registry.yarnpkg.com/glob/-/glob-3.1.21.tgz#d29e0a055dea5138f4d07ed40e8982e83c2066cd"
@ -3698,12 +3717,12 @@ js-tokens@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7"
js-yaml@3.6.1:
version "3.6.1"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30"
js-yaml@3.8.1:
version "3.8.1"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.1.tgz#782ba50200be7b9e5a8537001b7804db3ad02628"
dependencies:
argparse "^1.0.7"
esprima "^2.6.0"
esprima "^3.1.1"
js-yaml@3.x, js-yaml@^3.2.7, js-yaml@^3.5.1, js-yaml@~3.7.0:
version "3.7.0"
@ -5040,9 +5059,9 @@ plur@^2.0.0:
dependencies:
irregular-plurals "^1.0.0"
pluralize@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-3.0.0.tgz#72799a9ef41a53ff0c03de6522e286b40d5c932d"
pluralize@3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-3.1.0.tgz#84213d0a12356069daa84060c559242633161368"
pluralize@^1.2.1:
version "1.2.1"
@ -5919,15 +5938,7 @@ setprototypeof@1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.2.tgz#81a552141ec104b88e89ce383103ad5c66564d08"
shelljs@0.7.4:
version "0.7.4"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.4.tgz#b8f04b3a74ddfafea22acf98e0be45ded53d59c8"
dependencies:
glob "^7.0.0"
interpret "^1.0.0"
rechoir "^0.6.2"
shelljs@^0.7.0, shelljs@^0.7.5:
shelljs@0.7.6, shelljs@^0.7.0, shelljs@^0.7.5:
version "0.7.6"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.6.tgz#379cccfb56b91c8601e4793356eb5382924de9ad"
dependencies: