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
92d1c612
Commit
92d1c612
authored
Feb 23, 2018
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Harmonize `accesslog.enabled` flag for Undertow
Closes gh-12178
parent
09ff815f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
14 deletions
+4
-14
ServerProperties.java
...ingframework/boot/autoconfigure/web/ServerProperties.java
+3
-3
UndertowWebServerFactoryCustomizer.java
...gure/web/embedded/UndertowWebServerFactoryCustomizer.java
+1
-1
UndertowWebServerFactoryCustomizerTests.java
...web/embedded/UndertowWebServerFactoryCustomizerTests.java
+0
-10
No files found.
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java
View file @
92d1c612
...
@@ -1058,7 +1058,7 @@ public class ServerProperties {
...
@@ -1058,7 +1058,7 @@ public class ServerProperties {
/**
/**
* Whether to enable the access log.
* Whether to enable the access log.
*/
*/
private
Boolean
enabled
;
private
boolean
enabled
=
false
;
/**
/**
* Format pattern for access logs.
* Format pattern for access logs.
...
@@ -1085,11 +1085,11 @@ public class ServerProperties {
...
@@ -1085,11 +1085,11 @@ public class ServerProperties {
*/
*/
private
boolean
rotate
=
true
;
private
boolean
rotate
=
true
;
public
Boolean
get
Enabled
()
{
public
boolean
is
Enabled
()
{
return
this
.
enabled
;
return
this
.
enabled
;
}
}
public
void
setEnabled
(
B
oolean
enabled
)
{
public
void
setEnabled
(
b
oolean
enabled
)
{
this
.
enabled
=
enabled
;
this
.
enabled
=
enabled
;
}
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/UndertowWebServerFactoryCustomizer.java
View file @
92d1c612
...
@@ -69,7 +69,7 @@ public class UndertowWebServerFactoryCustomizer implements
...
@@ -69,7 +69,7 @@ public class UndertowWebServerFactoryCustomizer implements
.
to
(
factory:
:
setWorkerThreads
);
.
to
(
factory:
:
setWorkerThreads
);
propertyMapper
.
from
(
undertowProperties:
:
getDirectBuffers
)
propertyMapper
.
from
(
undertowProperties:
:
getDirectBuffers
)
.
to
(
factory:
:
setUseDirectBuffers
);
.
to
(
factory:
:
setUseDirectBuffers
);
propertyMapper
.
from
(
accesslogProperties:
:
get
Enabled
)
propertyMapper
.
from
(
accesslogProperties:
:
is
Enabled
)
.
to
(
factory:
:
setAccessLogEnabled
);
.
to
(
factory:
:
setAccessLogEnabled
);
propertyMapper
.
from
(
accesslogProperties:
:
getDir
)
propertyMapper
.
from
(
accesslogProperties:
:
getDir
)
.
to
(
factory:
:
setAccessLogDirectory
);
.
to
(
factory:
:
setAccessLogDirectory
);
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/UndertowWebServerFactoryCustomizerTests.java
View file @
92d1c612
...
@@ -29,9 +29,7 @@ import org.springframework.boot.web.embedded.undertow.ConfigurableUndertowWebSer
...
@@ -29,9 +29,7 @@ import org.springframework.boot.web.embedded.undertow.ConfigurableUndertowWebSer
import
org.springframework.mock.env.MockEnvironment
;
import
org.springframework.mock.env.MockEnvironment
;
import
org.springframework.test.context.support.TestPropertySourceUtils
;
import
org.springframework.test.context.support.TestPropertySourceUtils
;
import
static
org
.
mockito
.
ArgumentMatchers
.
anyBoolean
;
import
static
org
.
mockito
.
Mockito
.
mock
;
import
static
org
.
mockito
.
Mockito
.
mock
;
import
static
org
.
mockito
.
Mockito
.
never
;
import
static
org
.
mockito
.
Mockito
.
verify
;
import
static
org
.
mockito
.
Mockito
.
verify
;
/**
/**
...
@@ -102,14 +100,6 @@ public class UndertowWebServerFactoryCustomizerTests {
...
@@ -102,14 +100,6 @@ public class UndertowWebServerFactoryCustomizerTests {
verify
(
factory
).
setUseForwardHeaders
(
true
);
verify
(
factory
).
setUseForwardHeaders
(
true
);
}
}
@Test
public
void
skipNullElementsForUndertow
()
{
ConfigurableUndertowWebServerFactory
factory
=
mock
(
ConfigurableUndertowWebServerFactory
.
class
);
this
.
customizer
.
customize
(
factory
);
verify
(
factory
,
never
()).
setAccessLogEnabled
(
anyBoolean
());
}
private
void
bind
(
String
...
inlinedProperties
)
{
private
void
bind
(
String
...
inlinedProperties
)
{
TestPropertySourceUtils
.
addInlinedPropertiesToEnvironment
(
this
.
environment
,
TestPropertySourceUtils
.
addInlinedPropertiesToEnvironment
(
this
.
environment
,
inlinedProperties
);
inlinedProperties
);
...
...
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