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
37646517
Commit
37646517
authored
May 21, 2018
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
d9029ef6
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
71 additions
and
111 deletions
+71
-111
JerseyAutoConfiguration.java
...rk/boot/autoconfigure/jersey/JerseyAutoConfiguration.java
+17
-31
KafkaProperties.java
...ngframework/boot/autoconfigure/kafka/KafkaProperties.java
+44
-69
JerseyAutoConfigurationCustomApplicationTests.java
...jersey/JerseyAutoConfigurationCustomApplicationTests.java
+5
-7
WarPackagingTests.java
...va/org/springframework/boot/gradle/WarPackagingTests.java
+1
-1
ConfigurationMetadataAnnotationProcessor.java
...onprocessor/ConfigurationMetadataAnnotationProcessor.java
+0
-1
LombokAccessLevelOverwriteDataProperties.java
...mple/lombok/LombokAccessLevelOverwriteDataProperties.java
+2
-1
LombokAccessLevelOverwriteExplicitProperties.java
.../lombok/LombokAccessLevelOverwriteExplicitProperties.java
+1
-0
LombokExplicitProperties.java
.../configurationsample/lombok/LombokExplicitProperties.java
+1
-1
No files found.
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfiguration.java
View file @
37646517
...
...
@@ -115,10 +115,9 @@ public class JerseyAutoConfiguration implements ServletContextAware {
private
void
resolveApplicationPath
()
{
if
(
StringUtils
.
hasLength
(
this
.
jersey
.
getApplicationPath
()))
{
this
.
path
=
parseApplicationPath
(
this
.
jersey
.
getApplicationPath
());
}
else
{
this
.
path
=
findApplicationPath
(
AnnotationUtils
.
findAnnotation
(
this
.
config
.
getApplication
().
getClass
(),
ApplicationPath
.
class
));
}
else
{
this
.
path
=
findApplicationPath
(
AnnotationUtils
.
findAnnotation
(
this
.
config
.
getApplication
().
getClass
(),
ApplicationPath
.
class
));
}
}
...
...
@@ -149,8 +148,7 @@ public class JerseyAutoConfiguration implements ServletContextAware {
registration
.
setFilter
(
new
ServletContainer
(
this
.
config
));
registration
.
setUrlPatterns
(
Arrays
.
asList
(
this
.
path
));
registration
.
setOrder
(
this
.
jersey
.
getFilter
().
getOrder
());
registration
.
addInitParameter
(
ServletProperties
.
FILTER_CONTEXT_PATH
,
stripPattern
(
this
.
path
));
registration
.
addInitParameter
(
ServletProperties
.
FILTER_CONTEXT_PATH
,
stripPattern
(
this
.
path
));
addInitParameters
(
registration
);
registration
.
setName
(
"jerseyFilter"
);
registration
.
setDispatcherTypes
(
EnumSet
.
allOf
(
DispatcherType
.
class
));
...
...
@@ -168,8 +166,8 @@ public class JerseyAutoConfiguration implements ServletContextAware {
@ConditionalOnMissingBean
(
name
=
"jerseyServletRegistration"
)
@ConditionalOnProperty
(
prefix
=
"spring.jersey"
,
name
=
"type"
,
havingValue
=
"servlet"
,
matchIfMissing
=
true
)
public
ServletRegistrationBean
jerseyServletRegistration
()
{
ServletRegistrationBean
registration
=
new
ServletRegistrationBean
(
new
ServletContainer
(
this
.
config
),
this
.
path
);
ServletRegistrationBean
registration
=
new
ServletRegistrationBean
(
new
ServletContainer
(
this
.
config
),
this
.
path
);
addInitParameters
(
registration
);
registration
.
setName
(
getServletRegistrationName
());
registration
.
setLoadOnStartup
(
this
.
jersey
.
getServlet
().
getLoadOnStartup
());
...
...
@@ -204,23 +202,18 @@ public class JerseyAutoConfiguration implements ServletContextAware {
@Override
public
void
setServletContext
(
ServletContext
servletContext
)
{
String
servletRegistrationName
=
getServletRegistrationName
();
ServletRegistration
registration
=
servletContext
.
getServletRegistration
(
servletRegistrationName
);
ServletRegistration
registration
=
servletContext
.
getServletRegistration
(
servletRegistrationName
);
if
(
registration
!=
null
)
{
if
(
logger
.
isInfoEnabled
())
{
logger
.
info
(
"Configuring existing registration for Jersey servlet '"
+
servletRegistrationName
+
"'"
);
logger
.
info
(
"Configuring existing registration for Jersey servlet '"
+
servletRegistrationName
+
"'"
);
}
registration
.
setInitParameters
(
this
.
jersey
.
getInit
());
registration
.
setInitParameter
(
CommonProperties
.
METAINF_SERVICES_LOOKUP_DISABLE
,
Boolean
.
TRUE
.
toString
());
registration
.
setInitParameter
(
CommonProperties
.
METAINF_SERVICES_LOOKUP_DISABLE
,
Boolean
.
TRUE
.
toString
());
}
}
@Order
(
Ordered
.
HIGHEST_PRECEDENCE
)
public
static
final
class
JerseyWebApplicationInitializer
implements
WebApplicationInitializer
{
public
static
final
class
JerseyWebApplicationInitializer
implements
WebApplicationInitializer
{
@Override
public
void
onStartup
(
ServletContext
servletContext
)
throws
ServletException
{
...
...
@@ -239,22 +232,19 @@ public class JerseyAutoConfiguration implements ServletContextAware {
private
static
final
String
JAXB_ANNOTATION_INTROSPECTOR_CLASS_NAME
=
"com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector"
;
@Bean
public
ResourceConfigCustomizer
resourceConfigCustomizer
(
final
ObjectMapper
objectMapper
)
{
public
ResourceConfigCustomizer
resourceConfigCustomizer
(
final
ObjectMapper
objectMapper
)
{
addJaxbAnnotationIntrospectorIfPresent
(
objectMapper
);
return
new
ResourceConfigCustomizer
()
{
@Override
public
void
customize
(
ResourceConfig
config
)
{
config
.
register
(
JacksonFeature
.
class
);
config
.
register
(
new
ObjectMapperContextResolver
(
objectMapper
),
ContextResolver
.
class
);
config
.
register
(
new
ObjectMapperContextResolver
(
objectMapper
),
ContextResolver
.
class
);
}
};
}
private
void
addJaxbAnnotationIntrospectorIfPresent
(
ObjectMapper
objectMapper
)
{
if
(
ClassUtils
.
isPresent
(
JAXB_ANNOTATION_INTROSPECTOR_CLASS_NAME
,
getClass
().
getClassLoader
()))
{
if
(
ClassUtils
.
isPresent
(
JAXB_ANNOTATION_INTROSPECTOR_CLASS_NAME
,
getClass
().
getClassLoader
()))
{
new
ObjectMapperCustomizer
().
addJaxbAnnotationIntrospector
(
objectMapper
);
}
}
...
...
@@ -265,22 +255,18 @@ public class JerseyAutoConfiguration implements ServletContextAware {
JaxbAnnotationIntrospector
jaxbAnnotationIntrospector
=
new
JaxbAnnotationIntrospector
(
objectMapper
.
getTypeFactory
());
objectMapper
.
setAnnotationIntrospectors
(
createPair
(
objectMapper
.
getSerializationConfig
(),
jaxbAnnotationIntrospector
),
createPair
(
objectMapper
.
getDeserializationConfig
(),
jaxbAnnotationIntrospector
));
createPair
(
objectMapper
.
getSerializationConfig
(),
jaxbAnnotationIntrospector
),
createPair
(
objectMapper
.
getDeserializationConfig
(),
jaxbAnnotationIntrospector
));
}
private
AnnotationIntrospector
createPair
(
MapperConfig
<?>
config
,
JaxbAnnotationIntrospector
jaxbAnnotationIntrospector
)
{
return
AnnotationIntrospector
.
pair
(
config
.
getAnnotationIntrospector
(),
jaxbAnnotationIntrospector
);
return
AnnotationIntrospector
.
pair
(
config
.
getAnnotationIntrospector
(),
jaxbAnnotationIntrospector
);
}
}
private
static
final
class
ObjectMapperContextResolver
implements
ContextResolver
<
ObjectMapper
>
{
private
static
final
class
ObjectMapperContextResolver
implements
ContextResolver
<
ObjectMapper
>
{
private
final
ObjectMapper
objectMapper
;
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java
View file @
37646517
...
...
@@ -53,8 +53,7 @@ public class KafkaProperties {
* Comma-delimited list of host:port pairs to use for establishing the initial
* connection to the Kafka cluster.
*/
private
List
<
String
>
bootstrapServers
=
new
ArrayList
<
String
>(
Collections
.
singletonList
(
"localhost:9092"
));
private
List
<
String
>
bootstrapServers
=
new
ArrayList
<
String
>(
Collections
.
singletonList
(
"localhost:9092"
));
/**
* Id to pass to the server when making requests; used for server-side logging.
...
...
@@ -123,8 +122,7 @@ public class KafkaProperties {
private
Map
<
String
,
Object
>
buildCommonProperties
()
{
Map
<
String
,
Object
>
properties
=
new
HashMap
<
String
,
Object
>();
if
(
this
.
bootstrapServers
!=
null
)
{
properties
.
put
(
CommonClientConfigs
.
BOOTSTRAP_SERVERS_CONFIG
,
this
.
bootstrapServers
);
properties
.
put
(
CommonClientConfigs
.
BOOTSTRAP_SERVERS_CONFIG
,
this
.
bootstrapServers
);
}
if
(
this
.
clientId
!=
null
)
{
properties
.
put
(
CommonClientConfigs
.
CLIENT_ID_CONFIG
,
this
.
clientId
);
...
...
@@ -133,20 +131,16 @@ public class KafkaProperties {
properties
.
put
(
SslConfigs
.
SSL_KEY_PASSWORD_CONFIG
,
this
.
ssl
.
getKeyPassword
());
}
if
(
this
.
ssl
.
getKeystoreLocation
()
!=
null
)
{
properties
.
put
(
SslConfigs
.
SSL_KEYSTORE_LOCATION_CONFIG
,
resourceToPath
(
this
.
ssl
.
getKeystoreLocation
()));
properties
.
put
(
SslConfigs
.
SSL_KEYSTORE_LOCATION_CONFIG
,
resourceToPath
(
this
.
ssl
.
getKeystoreLocation
()));
}
if
(
this
.
ssl
.
getKeystorePassword
()
!=
null
)
{
properties
.
put
(
SslConfigs
.
SSL_KEYSTORE_PASSWORD_CONFIG
,
this
.
ssl
.
getKeystorePassword
());
properties
.
put
(
SslConfigs
.
SSL_KEYSTORE_PASSWORD_CONFIG
,
this
.
ssl
.
getKeystorePassword
());
}
if
(
this
.
ssl
.
getTruststoreLocation
()
!=
null
)
{
properties
.
put
(
SslConfigs
.
SSL_TRUSTSTORE_LOCATION_CONFIG
,
resourceToPath
(
this
.
ssl
.
getTruststoreLocation
()));
properties
.
put
(
SslConfigs
.
SSL_TRUSTSTORE_LOCATION_CONFIG
,
resourceToPath
(
this
.
ssl
.
getTruststoreLocation
()));
}
if
(
this
.
ssl
.
getTruststorePassword
()
!=
null
)
{
properties
.
put
(
SslConfigs
.
SSL_TRUSTSTORE_PASSWORD_CONFIG
,
this
.
ssl
.
getTruststorePassword
());
properties
.
put
(
SslConfigs
.
SSL_TRUSTSTORE_PASSWORD_CONFIG
,
this
.
ssl
.
getTruststorePassword
());
}
if
(!
CollectionUtils
.
isEmpty
(
this
.
properties
))
{
properties
.
putAll
(
this
.
properties
);
...
...
@@ -159,8 +153,9 @@ public class KafkaProperties {
* <p>
* This allows you to add additional properties, if necessary, and override the
* default kafkaConsumerFactory bean.
* @return the consumer properties initialized with the customizations defined on this
* instance
*
* @return the consumer properties initialized with the customizations defined
* on this instance
*/
public
Map
<
String
,
Object
>
buildConsumerProperties
()
{
Map
<
String
,
Object
>
properties
=
buildCommonProperties
();
...
...
@@ -173,8 +168,9 @@ public class KafkaProperties {
* <p>
* This allows you to add additional properties, if necessary, and override the
* default kafkaProducerFactory bean.
* @return the producer properties initialized with the customizations defined on this
* instance
*
* @return the producer properties initialized with the customizations defined
* on this instance
*/
public
Map
<
String
,
Object
>
buildProducerProperties
()
{
Map
<
String
,
Object
>
properties
=
buildCommonProperties
();
...
...
@@ -185,10 +181,8 @@ public class KafkaProperties {
private
static
String
resourceToPath
(
Resource
resource
)
{
try
{
return
resource
.
getFile
().
getAbsolutePath
();
}
catch
(
IOException
ex
)
{
throw
new
IllegalStateException
(
"Resource '"
+
resource
+
"' must be on a file system"
,
ex
);
}
catch
(
IOException
ex
)
{
throw
new
IllegalStateException
(
"Resource '"
+
resource
+
"' must be on a file system"
,
ex
);
}
}
...
...
@@ -197,8 +191,8 @@ public class KafkaProperties {
private
final
Ssl
ssl
=
new
Ssl
();
/**
* Frequency in milliseconds that the consumer offsets are auto-committed to
Kafka
* if 'enable.auto.commit' true.
* Frequency in milliseconds that the consumer offsets are auto-committed to
*
Kafka
if 'enable.auto.commit' true.
*/
private
Integer
autoCommitInterval
;
...
...
@@ -220,7 +214,8 @@ public class KafkaProperties {
private
String
clientId
;
/**
* If true the consumer's offset will be periodically committed in the background.
* If true the consumer's offset will be periodically committed in the
* background.
*/
private
Boolean
enableAutoCommit
;
...
...
@@ -364,27 +359,22 @@ public class KafkaProperties {
public
Map
<
String
,
Object
>
buildProperties
()
{
Map
<
String
,
Object
>
properties
=
new
HashMap
<
String
,
Object
>();
if
(
this
.
autoCommitInterval
!=
null
)
{
properties
.
put
(
ConsumerConfig
.
AUTO_COMMIT_INTERVAL_MS_CONFIG
,
this
.
autoCommitInterval
);
properties
.
put
(
ConsumerConfig
.
AUTO_COMMIT_INTERVAL_MS_CONFIG
,
this
.
autoCommitInterval
);
}
if
(
this
.
autoOffsetReset
!=
null
)
{
properties
.
put
(
ConsumerConfig
.
AUTO_OFFSET_RESET_CONFIG
,
this
.
autoOffsetReset
);
properties
.
put
(
ConsumerConfig
.
AUTO_OFFSET_RESET_CONFIG
,
this
.
autoOffsetReset
);
}
if
(
this
.
bootstrapServers
!=
null
)
{
properties
.
put
(
ConsumerConfig
.
BOOTSTRAP_SERVERS_CONFIG
,
this
.
bootstrapServers
);
properties
.
put
(
ConsumerConfig
.
BOOTSTRAP_SERVERS_CONFIG
,
this
.
bootstrapServers
);
}
if
(
this
.
clientId
!=
null
)
{
properties
.
put
(
ConsumerConfig
.
CLIENT_ID_CONFIG
,
this
.
clientId
);
}
if
(
this
.
enableAutoCommit
!=
null
)
{
properties
.
put
(
ConsumerConfig
.
ENABLE_AUTO_COMMIT_CONFIG
,
this
.
enableAutoCommit
);
properties
.
put
(
ConsumerConfig
.
ENABLE_AUTO_COMMIT_CONFIG
,
this
.
enableAutoCommit
);
}
if
(
this
.
fetchMaxWait
!=
null
)
{
properties
.
put
(
ConsumerConfig
.
FETCH_MAX_WAIT_MS_CONFIG
,
this
.
fetchMaxWait
);
properties
.
put
(
ConsumerConfig
.
FETCH_MAX_WAIT_MS_CONFIG
,
this
.
fetchMaxWait
);
}
if
(
this
.
fetchMinSize
!=
null
)
{
properties
.
put
(
ConsumerConfig
.
FETCH_MIN_BYTES_CONFIG
,
this
.
fetchMinSize
);
...
...
@@ -393,40 +383,32 @@ public class KafkaProperties {
properties
.
put
(
ConsumerConfig
.
GROUP_ID_CONFIG
,
this
.
groupId
);
}
if
(
this
.
heartbeatInterval
!=
null
)
{
properties
.
put
(
ConsumerConfig
.
HEARTBEAT_INTERVAL_MS_CONFIG
,
this
.
heartbeatInterval
);
properties
.
put
(
ConsumerConfig
.
HEARTBEAT_INTERVAL_MS_CONFIG
,
this
.
heartbeatInterval
);
}
if
(
this
.
keyDeserializer
!=
null
)
{
properties
.
put
(
ConsumerConfig
.
KEY_DESERIALIZER_CLASS_CONFIG
,
this
.
keyDeserializer
);
properties
.
put
(
ConsumerConfig
.
KEY_DESERIALIZER_CLASS_CONFIG
,
this
.
keyDeserializer
);
}
if
(
this
.
ssl
.
getKeyPassword
()
!=
null
)
{
properties
.
put
(
SslConfigs
.
SSL_KEY_PASSWORD_CONFIG
,
this
.
ssl
.
getKeyPassword
());
properties
.
put
(
SslConfigs
.
SSL_KEY_PASSWORD_CONFIG
,
this
.
ssl
.
getKeyPassword
());
}
if
(
this
.
ssl
.
getKeystoreLocation
()
!=
null
)
{
properties
.
put
(
SslConfigs
.
SSL_KEYSTORE_LOCATION_CONFIG
,
resourceToPath
(
this
.
ssl
.
getKeystoreLocation
()));
properties
.
put
(
SslConfigs
.
SSL_KEYSTORE_LOCATION_CONFIG
,
resourceToPath
(
this
.
ssl
.
getKeystoreLocation
()));
}
if
(
this
.
ssl
.
getKeystorePassword
()
!=
null
)
{
properties
.
put
(
SslConfigs
.
SSL_KEYSTORE_PASSWORD_CONFIG
,
this
.
ssl
.
getKeystorePassword
());
properties
.
put
(
SslConfigs
.
SSL_KEYSTORE_PASSWORD_CONFIG
,
this
.
ssl
.
getKeystorePassword
());
}
if
(
this
.
ssl
.
getTruststoreLocation
()
!=
null
)
{
properties
.
put
(
SslConfigs
.
SSL_TRUSTSTORE_LOCATION_CONFIG
,
resourceToPath
(
this
.
ssl
.
getTruststoreLocation
()));
}
if
(
this
.
ssl
.
getTruststorePassword
()
!=
null
)
{
properties
.
put
(
SslConfigs
.
SSL_TRUSTSTORE_PASSWORD_CONFIG
,
this
.
ssl
.
getTruststorePassword
());
properties
.
put
(
SslConfigs
.
SSL_TRUSTSTORE_PASSWORD_CONFIG
,
this
.
ssl
.
getTruststorePassword
());
}
if
(
this
.
valueDeserializer
!=
null
)
{
properties
.
put
(
ConsumerConfig
.
VALUE_DESERIALIZER_CLASS_CONFIG
,
this
.
valueDeserializer
);
properties
.
put
(
ConsumerConfig
.
VALUE_DESERIALIZER_CLASS_CONFIG
,
this
.
valueDeserializer
);
}
if
(
this
.
maxPollRecords
!=
null
)
{
properties
.
put
(
ConsumerConfig
.
MAX_POLL_RECORDS_CONFIG
,
this
.
maxPollRecords
);
properties
.
put
(
ConsumerConfig
.
MAX_POLL_RECORDS_CONFIG
,
this
.
maxPollRecords
);
}
return
properties
;
}
...
...
@@ -444,8 +426,9 @@ public class KafkaProperties {
private
String
acks
;
/**
* Default batch size in bytes. A small batch size will make batching less common
* and may reduce throughput (a batch size of zero disables batching entirely).
* Default batch size in bytes. A small batch size will make batching less
* common and may reduce throughput (a batch size of zero disables batching
* entirely).
*/
private
Integer
batchSize
;
...
...
@@ -456,8 +439,8 @@ public class KafkaProperties {
private
List
<
String
>
bootstrapServers
;
/**
* Total bytes of memory the producer can use to buffer records waiting to be
sent
* to the server.
* Total bytes of memory the producer can use to buffer records waiting to be
*
sent
to the server.
*/
private
Long
bufferMemory
;
...
...
@@ -571,8 +554,7 @@ public class KafkaProperties {
properties
.
put
(
ProducerConfig
.
BATCH_SIZE_CONFIG
,
this
.
batchSize
);
}
if
(
this
.
bootstrapServers
!=
null
)
{
properties
.
put
(
ProducerConfig
.
BOOTSTRAP_SERVERS_CONFIG
,
this
.
bootstrapServers
);
properties
.
put
(
ProducerConfig
.
BOOTSTRAP_SERVERS_CONFIG
,
this
.
bootstrapServers
);
}
if
(
this
.
bufferMemory
!=
null
)
{
properties
.
put
(
ProducerConfig
.
BUFFER_MEMORY_CONFIG
,
this
.
bufferMemory
);
...
...
@@ -581,39 +563,32 @@ public class KafkaProperties {
properties
.
put
(
ProducerConfig
.
CLIENT_ID_CONFIG
,
this
.
clientId
);
}
if
(
this
.
compressionType
!=
null
)
{
properties
.
put
(
ProducerConfig
.
COMPRESSION_TYPE_CONFIG
,
this
.
compressionType
);
properties
.
put
(
ProducerConfig
.
COMPRESSION_TYPE_CONFIG
,
this
.
compressionType
);
}
if
(
this
.
keySerializer
!=
null
)
{
properties
.
put
(
ProducerConfig
.
KEY_SERIALIZER_CLASS_CONFIG
,
this
.
keySerializer
);
properties
.
put
(
ProducerConfig
.
KEY_SERIALIZER_CLASS_CONFIG
,
this
.
keySerializer
);
}
if
(
this
.
retries
!=
null
)
{
properties
.
put
(
ProducerConfig
.
RETRIES_CONFIG
,
this
.
retries
);
}
if
(
this
.
ssl
.
getKeyPassword
()
!=
null
)
{
properties
.
put
(
SslConfigs
.
SSL_KEY_PASSWORD_CONFIG
,
this
.
ssl
.
getKeyPassword
());
properties
.
put
(
SslConfigs
.
SSL_KEY_PASSWORD_CONFIG
,
this
.
ssl
.
getKeyPassword
());
}
if
(
this
.
ssl
.
getKeystoreLocation
()
!=
null
)
{
properties
.
put
(
SslConfigs
.
SSL_KEYSTORE_LOCATION_CONFIG
,
resourceToPath
(
this
.
ssl
.
getKeystoreLocation
()));
properties
.
put
(
SslConfigs
.
SSL_KEYSTORE_LOCATION_CONFIG
,
resourceToPath
(
this
.
ssl
.
getKeystoreLocation
()));
}
if
(
this
.
ssl
.
getKeystorePassword
()
!=
null
)
{
properties
.
put
(
SslConfigs
.
SSL_KEYSTORE_PASSWORD_CONFIG
,
this
.
ssl
.
getKeystorePassword
());
properties
.
put
(
SslConfigs
.
SSL_KEYSTORE_PASSWORD_CONFIG
,
this
.
ssl
.
getKeystorePassword
());
}
if
(
this
.
ssl
.
getTruststoreLocation
()
!=
null
)
{
properties
.
put
(
SslConfigs
.
SSL_TRUSTSTORE_LOCATION_CONFIG
,
resourceToPath
(
this
.
ssl
.
getTruststoreLocation
()));
}
if
(
this
.
ssl
.
getTruststorePassword
()
!=
null
)
{
properties
.
put
(
SslConfigs
.
SSL_TRUSTSTORE_PASSWORD_CONFIG
,
this
.
ssl
.
getTruststorePassword
());
properties
.
put
(
SslConfigs
.
SSL_TRUSTSTORE_PASSWORD_CONFIG
,
this
.
ssl
.
getTruststorePassword
());
}
if
(
this
.
valueSerializer
!=
null
)
{
properties
.
put
(
ProducerConfig
.
VALUE_SERIALIZER_CLASS_CONFIG
,
this
.
valueSerializer
);
properties
.
put
(
ProducerConfig
.
VALUE_SERIALIZER_CLASS_CONFIG
,
this
.
valueSerializer
);
}
return
properties
;
}
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationCustomApplicationTests.java
View file @
37646517
...
...
@@ -43,7 +43,8 @@ import org.springframework.test.context.junit4.SpringRunner;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
/**
* Tests for {@link JerseyAutoConfiguration} when using a custom {@link Application}.
* Tests for {@link JerseyAutoConfiguration} when using a custom
* {@link Application}.
*
* @author Stephane Nicoll
*/
...
...
@@ -52,14 +53,12 @@ import static org.assertj.core.api.Assertions.assertThat;
@DirtiesContext
public
class
JerseyAutoConfigurationCustomApplicationTests
{
@Autowired
private
TestRestTemplate
restTemplate
;
@Test
public
void
contextLoads
()
{
ResponseEntity
<
String
>
entity
=
this
.
restTemplate
.
getForEntity
(
"/test/hello"
,
String
.
class
);
ResponseEntity
<
String
>
entity
=
this
.
restTemplate
.
getForEntity
(
"/test/hello"
,
String
.
class
);
assertThat
(
entity
.
getStatusCode
()).
isEqualTo
(
HttpStatus
.
OK
);
}
...
...
@@ -79,9 +78,8 @@ public class JerseyAutoConfigurationCustomApplicationTests {
}
@Configuration
@Import
({
EmbeddedServletContainerAutoConfiguration
.
class
,
ServerPropertiesAutoConfiguration
.
class
,
JerseyAutoConfiguration
.
class
,
PropertyPlaceholderAutoConfiguration
.
class
})
@Import
({
EmbeddedServletContainerAutoConfiguration
.
class
,
ServerPropertiesAutoConfiguration
.
class
,
JerseyAutoConfiguration
.
class
,
PropertyPlaceholderAutoConfiguration
.
class
})
static
class
TestConfiguration
{
@Configuration
...
...
spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/WarPackagingTests.java
View file @
37646517
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
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.
...
...
spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessor.java
View file @
37646517
...
...
@@ -338,7 +338,6 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor
return
hasAnnotation
(
element
,
LOMBOK_DATA_ANNOTATION
);
}
private
boolean
isAccessLevelPublic
(
AnnotationMirror
lombokAnnotation
)
{
Map
<
String
,
Object
>
values
=
getAnnotationElementValues
(
lombokAnnotation
);
Object
value
=
values
.
get
(
"value"
);
...
...
spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/lombok/LombokAccessLevelOverwriteDataProperties.java
View file @
37646517
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
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.
...
...
@@ -31,6 +31,7 @@ import org.springframework.boot.configurationsample.ConfigurationProperties;
*/
@Data
@ConfigurationProperties
(
prefix
=
"accesslevel.overwrite.data"
)
@SuppressWarnings
(
"unused"
)
public
class
LombokAccessLevelOverwriteDataProperties
{
private
String
name0
;
...
...
spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/lombok/LombokAccessLevelOverwriteExplicitProperties.java
View file @
37646517
...
...
@@ -31,6 +31,7 @@ import org.springframework.boot.configurationsample.ConfigurationProperties;
@Getter
(
AccessLevel
.
PUBLIC
)
@Setter
(
AccessLevel
.
PUBLIC
)
@ConfigurationProperties
(
prefix
=
"accesslevel.overwrite.explicit"
)
@SuppressWarnings
(
"unused"
)
public
class
LombokAccessLevelOverwriteExplicitProperties
{
private
String
name0
;
...
...
spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/lombok/LombokExplicitProperties.java
View file @
37646517
/*
* Copyright 2012-201
4
the original author or authors.
* Copyright 2012-201
8
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.
...
...
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