Merge branch '2.0.x'
This commit is contained in:
commit
40800355c7
|
@ -51,11 +51,9 @@ class OnExpressionCondition extends SpringBootCondition {
|
||||||
boolean result = evaluateExpression(beanFactory, expression);
|
boolean result = evaluateExpression(beanFactory, expression);
|
||||||
return new ConditionOutcome(result, messageBuilder.resultedIn(result));
|
return new ConditionOutcome(result, messageBuilder.resultedIn(result));
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
return ConditionOutcome
|
return ConditionOutcome
|
||||||
.noMatch(messageBuilder.because("no BeanFactory available."));
|
.noMatch(messageBuilder.because("no BeanFactory available."));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private Boolean evaluateExpression(ConfigurableListableBeanFactory beanFactory,
|
private Boolean evaluateExpression(ConfigurableListableBeanFactory beanFactory,
|
||||||
String expression) {
|
String expression) {
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
<aether.version>1.0.2.v20150114</aether.version>
|
<aether.version>1.0.2.v20150114</aether.version>
|
||||||
<maven.version>3.1.1</maven.version>
|
<maven.version>3.1.1</maven.version>
|
||||||
<spock.version>1.0-groovy-2.4</spock.version>
|
<spock.version>1.0-groovy-2.4</spock.version>
|
||||||
<spring-javaformat.version>0.0.1</spring-javaformat.version>
|
<spring-javaformat.version>0.0.2</spring-javaformat.version>
|
||||||
</properties>
|
</properties>
|
||||||
<scm>
|
<scm>
|
||||||
<url>http://github.com/spring-projects/spring-boot</url>
|
<url>http://github.com/spring-projects/spring-boot</url>
|
||||||
|
@ -578,11 +578,6 @@
|
||||||
<groupId>io.spring.javaformat</groupId>
|
<groupId>io.spring.javaformat</groupId>
|
||||||
<artifactId>spring-javaformat-maven-plugin</artifactId>
|
<artifactId>spring-javaformat-maven-plugin</artifactId>
|
||||||
<version>${spring-javaformat.version}</version>
|
<version>${spring-javaformat.version}</version>
|
||||||
<configuration>
|
|
||||||
<excludes>
|
|
||||||
<exclude>**/HelpMojo.java</exclude>
|
|
||||||
</excludes>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>validate</phase>
|
<phase>validate</phase>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2017 the original author or authors.
|
* Copyright 2012-2018 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -354,6 +354,10 @@ public class TomcatServletWebServerFactory extends AbstractServletWebServerFacto
|
||||||
private void configureSession(Context context) {
|
private void configureSession(Context context) {
|
||||||
long sessionTimeout = getSessionTimeoutInMinutes();
|
long sessionTimeout = getSessionTimeoutInMinutes();
|
||||||
context.setSessionTimeout((int) sessionTimeout);
|
context.setSessionTimeout((int) sessionTimeout);
|
||||||
|
Boolean httpOnly = getSession().getCookie().getHttpOnly();
|
||||||
|
if (httpOnly != null) {
|
||||||
|
context.setUseHttpOnly(httpOnly);
|
||||||
|
}
|
||||||
if (getSession().isPersistent()) {
|
if (getSession().isPersistent()) {
|
||||||
Manager manager = context.getManager();
|
Manager manager = context.getManager();
|
||||||
if (manager == null) {
|
if (manager == null) {
|
||||||
|
|
|
@ -420,6 +420,17 @@ public class TomcatServletWebServerFactoryTests
|
||||||
assertThat(tldSkipSet).contains("foo.jar", "bar.jar");
|
assertThat(tldSkipSet).contains("foo.jar", "bar.jar");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void customTomcatHttpOnlyCookie() {
|
||||||
|
TomcatServletWebServerFactory factory = getFactory();
|
||||||
|
factory.getSession().getCookie().setHttpOnly(false);
|
||||||
|
this.webServer = factory.getWebServer();
|
||||||
|
this.webServer.start();
|
||||||
|
Tomcat tomcat = ((TomcatWebServer) this.webServer).getTomcat();
|
||||||
|
Context context = (Context) tomcat.getHost().findChildren()[0];
|
||||||
|
assertThat(context.getUseHttpOnly()).isFalse();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected JspServlet getJspServlet() throws ServletException {
|
protected JspServlet getJspServlet() throws ServletException {
|
||||||
Tomcat tomcat = ((TomcatWebServer) this.webServer).getTomcat();
|
Tomcat tomcat = ((TomcatWebServer) this.webServer).getTomcat();
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<properties>
|
<properties>
|
||||||
<main.basedir>${basedir}/..</main.basedir>
|
<main.basedir>${basedir}/..</main.basedir>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
<spring-javaformat.version>0.0.1</spring-javaformat.version>
|
<spring-javaformat.version>0.0.2</spring-javaformat.version>
|
||||||
</properties>
|
</properties>
|
||||||
<modules>
|
<modules>
|
||||||
<module>spring-boot-sample-ant</module>
|
<module>spring-boot-sample-ant</module>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<!-- This POM is just to trigger the Ant/Ivy sample from Maven and to test -->
|
<!-- This POM is just to trigger the Ant/Ivy sample from Maven and to test -->
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2017 the original author or authors.
|
* Copyright 2012-2018 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2017 the original author or authors.
|
* Copyright 2012-2018 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2017 the original author or authors.
|
* Copyright 2012-2018 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2017 the original author or authors.
|
* Copyright 2012-2018 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2017 the original author or authors.
|
* Copyright 2012-2018 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2017 the original author or authors.
|
* Copyright 2012-2018 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2017 the original author or authors.
|
* Copyright 2012-2018 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
Loading…
Reference in New Issue