Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
53326695
Commit
53326695
authored
Feb 20, 2019
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
f8e5b9ba
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
24 additions
and
26 deletions
+24
-26
HibernateMetricsAutoConfiguration.java
...re/metrics/orm/jpa/HibernateMetricsAutoConfiguration.java
+10
-3
JerseyEndpointIntegrationTests.java
...igure/integrationtest/JerseyEndpointIntegrationTests.java
+1
-1
MeterRegistryConfigurerIntegrationTests.java
...gure/metrics/MeterRegistryConfigurerIntegrationTests.java
+2
-4
ElasticsearchJestHealthIndicatorTests.java
.../elasticsearch/ElasticsearchJestHealthIndicatorTests.java
+2
-1
Neo4jHealthIndicatorTests.java
...amework/boot/actuate/neo4j/Neo4jHealthIndicatorTests.java
+1
-1
DefaultErrorWebExceptionHandler.java
...e/web/reactive/error/DefaultErrorWebExceptionHandler.java
+0
-1
GroovyCompiler.java
...org/springframework/boot/cli/compiler/GroovyCompiler.java
+1
-2
AbstractApplicationContextRunnerTests.java
...context/runner/AbstractApplicationContextRunnerTests.java
+3
-7
BootJar.java
...g/springframework/boot/gradle/tasks/bundling/BootJar.java
+2
-3
BootWar.java
...g/springframework/boot/gradle/tasks/bundling/BootWar.java
+2
-3
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/orm/jpa/HibernateMetricsAutoConfiguration.java
View file @
53326695
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -20,6 +20,7 @@ import java.util.Collections;
import
java.util.Map
;
import
javax.persistence.EntityManagerFactory
;
import
javax.persistence.PersistenceException
;
import
io.micrometer.core.instrument.MeterRegistry
;
import
io.micrometer.core.instrument.binder.jpa.HibernateMetrics
;
...
...
@@ -69,8 +70,14 @@ public class HibernateMetricsAutoConfiguration {
private
void
bindEntityManagerFactoryToRegistry
(
String
beanName
,
EntityManagerFactory
entityManagerFactory
)
{
String
entityManagerFactoryName
=
getEntityManagerFactoryName
(
beanName
);
new
HibernateMetrics
(
entityManagerFactory
,
entityManagerFactoryName
,
Collections
.
emptyList
()).
bindTo
(
this
.
registry
);
try
{
new
HibernateMetrics
(
entityManagerFactory
.
unwrap
(
SessionFactory
.
class
),
entityManagerFactoryName
,
Collections
.
emptyList
())
.
bindTo
(
this
.
registry
);
}
catch
(
PersistenceException
ex
)
{
// Continue
}
}
/**
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/JerseyEndpointIntegrationTests.java
View file @
53326695
...
...
@@ -56,7 +56,7 @@ public class JerseyEndpointIntegrationTests {
testJerseyEndpoints
(
new
Class
[]
{
EndpointsConfiguration
.
class
});
}
protected
void
testJerseyEndpoints
(
Class
[]
userConfigurations
)
{
protected
void
testJerseyEndpoints
(
Class
<?>
[]
userConfigurations
)
{
FilteredClassLoader
classLoader
=
new
FilteredClassLoader
(
DispatcherServlet
.
class
);
new
WebApplicationContextRunner
(
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/MeterRegistryConfigurerIntegrationTests.java
View file @
53326695
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -77,9 +77,7 @@ public class MeterRegistryConfigurerIntegrationTests {
@Bean
MeterRegistryCustomizer
<?>
testCustomizer
()
{
return
(
registry
)
->
{
registry
.
config
().
commonTags
(
"testTag"
,
"testValue"
);
};
return
(
registry
)
->
registry
.
config
().
commonTags
(
"testTag"
,
"testValue"
);
}
@Bean
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/elasticsearch/ElasticsearchJestHealthIndicatorTests.java
View file @
53326695
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -62,6 +62,7 @@ public class ElasticsearchJestHealthIndicatorTests {
}
@Test
@SuppressWarnings
(
"unchecked"
)
public
void
elasticsearchWithYellowStatusIsUp
()
throws
IOException
{
given
(
this
.
jestClient
.
execute
(
any
(
Action
.
class
)))
.
willReturn
(
createJestResult
(
200
,
true
,
"yellow"
));
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/neo4j/Neo4jHealthIndicatorTests.java
View file @
53326695
...
...
@@ -77,7 +77,7 @@ public class Neo4jHealthIndicatorTests {
@Test
public
void
neo4jDown
()
{
CypherException
cypherException
=
new
CypherException
(
"Error executing Cypher"
,
CypherException
cypherException
=
new
CypherException
(
"Neo.ClientError.Statement.SyntaxError"
,
"Unable to execute invalid Cypher"
);
given
(
this
.
session
.
query
(
Neo4jHealthIndicator
.
CYPHER
,
Collections
.
emptyMap
()))
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandler.java
View file @
53326695
...
...
@@ -134,7 +134,6 @@ public class DefaultErrorWebExceptionHandler extends AbstractErrorWebExceptionHa
protected
Mono
<
ServerResponse
>
renderErrorResponse
(
ServerRequest
request
)
{
boolean
includeStackTrace
=
isIncludeStackTrace
(
request
,
MediaType
.
ALL
);
Map
<
String
,
Object
>
error
=
getErrorAttributes
(
request
,
includeStackTrace
);
HttpStatus
errorStatus
=
getHttpStatus
(
error
);
return
ServerResponse
.
status
(
getHttpStatus
(
error
))
.
contentType
(
MediaType
.
APPLICATION_JSON_UTF8
)
.
body
(
BodyInserters
.
fromObject
(
error
));
...
...
spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GroovyCompiler.java
View file @
53326695
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -307,7 +307,6 @@ public class GroovyCompiler {
private
static
class
MainClass
{
@SuppressWarnings
(
"unchecked"
)
public
static
ClassNode
get
(
CompilationUnit
source
)
{
return
get
(
source
.
getAST
().
getClasses
());
}
...
...
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/runner/AbstractApplicationContextRunnerTests.java
View file @
53326695
...
...
@@ -152,13 +152,9 @@ public abstract class AbstractApplicationContextRunnerTests<T extends AbstractAp
@Test
public
void
runWithClassLoaderShouldSetClassLoaderOnContext
()
{
get
().
withClassLoader
(
new
FilteredClassLoader
(
Gson
.
class
.
getPackage
().
getName
()))
.
run
((
context
)
->
{
assertThatExceptionOfType
(
ClassNotFoundException
.
class
)
.
isThrownBy
(()
->
{
ClassUtils
.
forName
(
Gson
.
class
.
getName
(),
context
.
getClassLoader
());
});
});
.
run
((
context
)
->
assertThatExceptionOfType
(
ClassNotFoundException
.
class
)
.
isThrownBy
(()
->
ClassUtils
.
forName
(
Gson
.
class
.
getName
(),
context
.
getClassLoader
())));
}
@Test
...
...
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootJar.java
View file @
53326695
...
...
@@ -55,9 +55,8 @@ public class BootJar extends Jar implements BootArchive {
getMainSpec
().
with
(
this
.
bootInf
);
this
.
bootInf
.
into
(
"classes"
,
classpathFiles
(
File:
:
isDirectory
));
this
.
bootInf
.
into
(
"lib"
,
classpathFiles
(
File:
:
isFile
));
this
.
bootInf
.
filesMatching
(
"module-info.class"
,
(
details
)
->
{
details
.
setRelativePath
(
details
.
getRelativeSourcePath
());
});
this
.
bootInf
.
filesMatching
(
"module-info.class"
,
(
details
)
->
details
.
setRelativePath
(
details
.
getRelativeSourcePath
()));
getRootSpec
().
eachFile
((
details
)
->
{
String
pathString
=
details
.
getRelativePath
().
getPathString
();
if
(
pathString
.
startsWith
(
"BOOT-INF/lib/"
)
...
...
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootWar.java
View file @
53326695
...
...
@@ -54,9 +54,8 @@ public class BootWar extends War implements BootArchive {
(
copySpec
)
->
copySpec
.
from
(
(
Callable
<
Iterable
<
File
>>)
()
->
(
this
.
providedClasspath
!=
null
)
?
this
.
providedClasspath
:
Collections
.
emptyList
()));
getRootSpec
().
filesMatching
(
"module-info.class"
,
(
details
)
->
{
details
.
setRelativePath
(
details
.
getRelativeSourcePath
());
});
getRootSpec
().
filesMatching
(
"module-info.class"
,
(
details
)
->
details
.
setRelativePath
(
details
.
getRelativeSourcePath
()));
getRootSpec
().
eachFile
((
details
)
->
{
String
pathString
=
details
.
getRelativePath
().
getPathString
();
if
((
pathString
.
startsWith
(
"WEB-INF/lib/"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment