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
56544c8d
Commit
56544c8d
authored
Sep 09, 2016
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
a3c63b9c
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
30 additions
and
26 deletions
+30
-26
JpaBaseConfiguration.java
...work/boot/autoconfigure/orm/jpa/JpaBaseConfiguration.java
+3
-3
AbstractTemplateResolverConfiguration.java
...gure/thymeleaf/AbstractTemplateResolverConfiguration.java
+5
-1
ThymeleafAutoConfiguration.java
...t/autoconfigure/thymeleaf/ThymeleafAutoConfiguration.java
+4
-3
ThymeleafProperties.java
...ork/boot/autoconfigure/thymeleaf/ThymeleafProperties.java
+1
-1
MultipartAutoConfiguration.java
...rk/boot/autoconfigure/web/MultipartAutoConfiguration.java
+1
-1
MultipartProperties.java
...framework/boot/autoconfigure/web/MultipartProperties.java
+1
-1
pom.xml
spring-boot-parent/pom.xml
+1
-1
checkstyle.xml
spring-boot-parent/src/checkstyle/checkstyle.xml
+1
-0
RandomAccessDataFile.java
...pringframework/boot/loader/data/RandomAccessDataFile.java
+4
-4
Handler.java
...ain/java/org/springframework/boot/loader/jar/Handler.java
+5
-5
TomcatErrorPage.java
...amework/boot/context/embedded/tomcat/TomcatErrorPage.java
+4
-6
No files found.
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaBaseConfiguration.java
View file @
56544c8d
...
@@ -69,7 +69,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
...
@@ -69,7 +69,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
@Import
(
DataSourceInitializedPublisher
.
Registrar
.
class
)
@Import
(
DataSourceInitializedPublisher
.
Registrar
.
class
)
public
abstract
class
JpaBaseConfiguration
implements
BeanFactoryAware
{
public
abstract
class
JpaBaseConfiguration
implements
BeanFactoryAware
{
private
final
Log
logger
=
LogFactory
.
getLog
(
getClass
()
);
private
static
final
Log
logger
=
LogFactory
.
getLog
(
JpaBaseConfiguration
.
class
);
private
final
DataSource
dataSource
;
private
final
DataSource
dataSource
;
...
@@ -197,8 +197,8 @@ public abstract class JpaBaseConfiguration implements BeanFactoryAware {
...
@@ -197,8 +197,8 @@ public abstract class JpaBaseConfiguration implements BeanFactoryAware {
return
ResourceUtils
.
extractJarFileURL
(
url
);
return
ResourceUtils
.
extractJarFileURL
(
url
);
}
}
catch
(
Exception
ex
)
{
catch
(
Exception
ex
)
{
logger
.
info
(
"Could not determine persistence "
logger
.
info
(
"Could not determine persistence "
+
"unit root location from "
+
"unit root location from "
+
source
+
" : "
+
ex
);
+
source
+
" : "
+
ex
);
}
}
return
null
;
return
null
;
}
}
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/thymeleaf/AbstractTemplateResolverConfiguration.java
View file @
56544c8d
...
@@ -37,7 +37,7 @@ abstract class AbstractTemplateResolverConfiguration {
...
@@ -37,7 +37,7 @@ abstract class AbstractTemplateResolverConfiguration {
private
static
final
Log
logger
=
LogFactory
private
static
final
Log
logger
=
LogFactory
.
getLog
(
AbstractTemplateResolverConfiguration
.
class
);
.
getLog
(
AbstractTemplateResolverConfiguration
.
class
);
pr
otected
final
ThymeleafProperties
properties
;
pr
ivate
final
ThymeleafProperties
properties
;
private
final
ApplicationContext
applicationContext
;
private
final
ApplicationContext
applicationContext
;
...
@@ -47,6 +47,10 @@ abstract class AbstractTemplateResolverConfiguration {
...
@@ -47,6 +47,10 @@ abstract class AbstractTemplateResolverConfiguration {
this
.
applicationContext
=
applicationContext
;
this
.
applicationContext
=
applicationContext
;
}
}
protected
final
ThymeleafProperties
getProperties
()
{
return
this
.
properties
;
}
@PostConstruct
@PostConstruct
public
void
checkTemplateLocationExists
()
{
public
void
checkTemplateLocationExists
()
{
boolean
checkTemplateLocation
=
this
.
properties
.
isCheckTemplateLocation
();
boolean
checkTemplateLocation
=
this
.
properties
.
isCheckTemplateLocation
();
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafAutoConfiguration.java
View file @
56544c8d
...
@@ -137,9 +137,10 @@ public class ThymeleafAutoConfiguration {
...
@@ -137,9 +137,10 @@ public class ThymeleafAutoConfiguration {
@Override
@Override
public
SpringResourceTemplateResolver
defaultTemplateResolver
()
{
public
SpringResourceTemplateResolver
defaultTemplateResolver
()
{
SpringResourceTemplateResolver
resolver
=
super
.
defaultTemplateResolver
();
SpringResourceTemplateResolver
resolver
=
super
.
defaultTemplateResolver
();
Method
setCheckExistence
=
ReflectionUtils
Method
setCheckExistence
=
ReflectionUtils
.
findMethod
(
resolver
.
getClass
(),
.
findMethod
(
resolver
.
getClass
(),
"setCheckExistence"
,
boolean
.
class
);
"setCheckExistence"
,
boolean
.
class
);
ReflectionUtils
.
invokeMethod
(
setCheckExistence
,
resolver
,
this
.
properties
.
isCheckTemplate
());
ReflectionUtils
.
invokeMethod
(
setCheckExistence
,
resolver
,
getProperties
().
isCheckTemplate
());
return
resolver
;
return
resolver
;
}
}
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafProperties.java
View file @
56544c8d
...
@@ -109,7 +109,7 @@ public class ThymeleafProperties {
...
@@ -109,7 +109,7 @@ public class ThymeleafProperties {
}
}
public
boolean
isCheckTemplate
()
{
public
boolean
isCheckTemplate
()
{
return
checkTemplate
;
return
this
.
checkTemplate
;
}
}
public
void
setCheckTemplate
(
boolean
checkTemplate
)
{
public
void
setCheckTemplate
(
boolean
checkTemplate
)
{
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/MultipartAutoConfiguration.java
View file @
56544c8d
...
@@ -68,7 +68,7 @@ public class MultipartAutoConfiguration {
...
@@ -68,7 +68,7 @@ public class MultipartAutoConfiguration {
@ConditionalOnMissingBean
(
MultipartResolver
.
class
)
@ConditionalOnMissingBean
(
MultipartResolver
.
class
)
public
StandardServletMultipartResolver
multipartResolver
()
{
public
StandardServletMultipartResolver
multipartResolver
()
{
StandardServletMultipartResolver
multipartResolver
=
new
StandardServletMultipartResolver
();
StandardServletMultipartResolver
multipartResolver
=
new
StandardServletMultipartResolver
();
multipartResolver
.
setResolveLazily
(
multipartProperties
.
isResolveLazily
());
multipartResolver
.
setResolveLazily
(
this
.
multipartProperties
.
isResolveLazily
());
return
multipartResolver
;
return
multipartResolver
;
}
}
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/MultipartProperties.java
View file @
56544c8d
...
@@ -123,7 +123,7 @@ public class MultipartProperties {
...
@@ -123,7 +123,7 @@ public class MultipartProperties {
}
}
public
boolean
isResolveLazily
()
{
public
boolean
isResolveLazily
()
{
return
resolveLazily
;
return
this
.
resolveLazily
;
}
}
public
void
setResolveLazily
(
boolean
resolveLazily
)
{
public
void
setResolveLazily
(
boolean
resolveLazily
)
{
...
...
spring-boot-parent/pom.xml
View file @
56544c8d
...
@@ -264,7 +264,7 @@
...
@@ -264,7 +264,7 @@
<dependency>
<dependency>
<groupId>
com.puppycrawl.tools
</groupId>
<groupId>
com.puppycrawl.tools
</groupId>
<artifactId>
checkstyle
</artifactId>
<artifactId>
checkstyle
</artifactId>
<version>
6.17
</version>
<version>
7.1.1
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
</plugin>
</plugin>
...
...
spring-boot-parent/src/checkstyle/checkstyle.xml
View file @
56544c8d
...
@@ -62,6 +62,7 @@
...
@@ -62,6 +62,7 @@
<module
name=
"com.puppycrawl.tools.checkstyle.checks.coding.MultipleVariableDeclarationsCheck"
/>
<module
name=
"com.puppycrawl.tools.checkstyle.checks.coding.MultipleVariableDeclarationsCheck"
/>
<module
name=
"com.puppycrawl.tools.checkstyle.checks.coding.RequireThisCheck"
>
<module
name=
"com.puppycrawl.tools.checkstyle.checks.coding.RequireThisCheck"
>
<property
name=
"checkMethods"
value=
"false"
/>
<property
name=
"checkMethods"
value=
"false"
/>
<property
name=
"validateOnlyOverlapping"
value=
"false"
/>
</module>
</module>
<module
name=
"com.puppycrawl.tools.checkstyle.checks.coding.OneStatementPerLineCheck"
/>
<module
name=
"com.puppycrawl.tools.checkstyle.checks.coding.OneStatementPerLineCheck"
/>
...
...
spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/data/RandomAccessDataFile.java
View file @
56544c8d
...
@@ -260,10 +260,10 @@ public class RandomAccessDataFile implements RandomAccessData {
...
@@ -260,10 +260,10 @@ public class RandomAccessDataFile implements RandomAccessData {
public
void
close
()
throws
IOException
{
public
void
close
()
throws
IOException
{
this
.
available
.
acquireUninterruptibly
(
this
.
size
);
this
.
available
.
acquireUninterruptibly
(
this
.
size
);
try
{
try
{
RandomAccessFile
f
ile
=
this
.
files
.
poll
();
RandomAccessFile
pooledF
ile
=
this
.
files
.
poll
();
while
(
f
ile
!=
null
)
{
while
(
pooledF
ile
!=
null
)
{
f
ile
.
close
();
pooledF
ile
.
close
();
f
ile
=
this
.
files
.
poll
();
pooledF
ile
=
this
.
files
.
poll
();
}
}
}
}
finally
{
finally
{
...
...
spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/Handler.java
View file @
56544c8d
...
@@ -158,12 +158,12 @@ public class Handler extends URLStreamHandler {
...
@@ -158,12 +158,12 @@ public class Handler extends URLStreamHandler {
String
path
=
name
.
substring
(
FILE_PROTOCOL
.
length
());
String
path
=
name
.
substring
(
FILE_PROTOCOL
.
length
());
File
file
=
new
File
(
URLDecoder
.
decode
(
path
,
"UTF-8"
));
File
file
=
new
File
(
URLDecoder
.
decode
(
path
,
"UTF-8"
));
Map
<
File
,
JarFile
>
cache
=
rootFileCache
.
get
();
Map
<
File
,
JarFile
>
cache
=
rootFileCache
.
get
();
JarFile
jarFile
=
(
cache
==
null
?
null
:
cache
.
get
(
file
));
JarFile
result
=
(
cache
==
null
?
null
:
cache
.
get
(
file
));
if
(
jarFile
==
null
)
{
if
(
result
==
null
)
{
jarFile
=
new
JarFile
(
file
);
result
=
new
JarFile
(
file
);
addToRootFileCache
(
file
,
jarFile
);
addToRootFileCache
(
file
,
result
);
}
}
return
jarFile
;
return
result
;
}
}
catch
(
Exception
ex
)
{
catch
(
Exception
ex
)
{
throw
new
IOException
(
"Unable to open root Jar file '"
+
name
+
"'"
,
ex
);
throw
new
IOException
(
"Unable to open root Jar file '"
+
name
+
"'"
,
ex
);
...
...
spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/TomcatErrorPage.java
View file @
56544c8d
...
@@ -54,14 +54,12 @@ class TomcatErrorPage {
...
@@ -54,14 +54,12 @@ class TomcatErrorPage {
}
}
private
Object
createNativePage
(
ErrorPage
errorPage
)
{
private
Object
createNativePage
(
ErrorPage
errorPage
)
{
Object
nativePage
=
null
;
try
{
try
{
if
(
ClassUtils
.
isPresent
(
ERROR_PAGE_CLASS
,
null
))
{
if
(
ClassUtils
.
isPresent
(
ERROR_PAGE_CLASS
,
null
))
{
nativePage
=
BeanUtils
return
BeanUtils
.
instantiate
(
ClassUtils
.
forName
(
ERROR_PAGE_CLASS
,
null
));
.
instantiate
(
ClassUtils
.
forName
(
ERROR_PAGE_CLASS
,
null
));
}
}
else
if
(
ClassUtils
.
isPresent
(
LEGACY_ERROR_PAGE_CLASS
,
null
))
{
if
(
ClassUtils
.
isPresent
(
LEGACY_ERROR_PAGE_CLASS
,
null
))
{
nativePage
=
BeanUtils
return
BeanUtils
.
instantiate
(
ClassUtils
.
forName
(
LEGACY_ERROR_PAGE_CLASS
,
null
));
.
instantiate
(
ClassUtils
.
forName
(
LEGACY_ERROR_PAGE_CLASS
,
null
));
}
}
}
}
...
@@ -71,7 +69,7 @@ class TomcatErrorPage {
...
@@ -71,7 +69,7 @@ class TomcatErrorPage {
catch
(
LinkageError
ex
)
{
catch
(
LinkageError
ex
)
{
// Swallow and continue
// Swallow and continue
}
}
return
n
ativePage
;
return
n
ull
;
}
}
public
void
addToContext
(
Context
context
)
{
public
void
addToContext
(
Context
context
)
{
...
...
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