Skip to content

Commit

Permalink
Merge branch '2.0.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
philwebb committed May 30, 2018
2 parents 463e11a + 587df6a commit 4080035
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ public ConditionOutcome getMatchOutcome(ConditionContext context,
boolean result = evaluateExpression(beanFactory, expression);
return new ConditionOutcome(result, messageBuilder.resultedIn(result));
}
else {
return ConditionOutcome
.noMatch(messageBuilder.because("no BeanFactory available."));
}
return ConditionOutcome
.noMatch(messageBuilder.because("no BeanFactory available."));
}

private Boolean evaluateExpression(ConfigurableListableBeanFactory beanFactory,
Expand Down
7 changes: 1 addition & 6 deletions spring-boot-project/spring-boot-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<aether.version>1.0.2.v20150114</aether.version>
<maven.version>3.1.1</maven.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>
<scm>
<url>http://github.com/spring-projects/spring-boot</url>
Expand Down Expand Up @@ -578,11 +578,6 @@
<groupId>io.spring.javaformat</groupId>
<artifactId>spring-javaformat-maven-plugin</artifactId>
<version>${spring-javaformat.version}</version>
<configuration>
<excludes>
<exclude>**/HelpMojo.java</exclude>
</excludes>
</configuration>
<executions>
<execution>
<phase>validate</phase>
Expand Down
Original file line number Diff line number Diff line change
@@ -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");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,10 @@ protected void configureContext(Context context,
private void configureSession(Context context) {
long sessionTimeout = getSessionTimeoutInMinutes();
context.setSessionTimeout((int) sessionTimeout);
Boolean httpOnly = getSession().getCookie().getHttpOnly();
if (httpOnly != null) {
context.setUseHttpOnly(httpOnly);
}
if (getSession().isPersistent()) {
Manager manager = context.getManager();
if (manager == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,17 @@ public void tldSkipPatternsShouldBeAppliedToContextJarScanner() {
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
protected JspServlet getJspServlet() throws ServletException {
Tomcat tomcat = ((TomcatWebServer) this.webServer).getTomcat();
Expand Down
2 changes: 1 addition & 1 deletion spring-boot-samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<properties>
<main.basedir>${basedir}/..</main.basedir>
<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>
<modules>
<module>spring-boot-sample-ant</module>
Expand Down
5 changes: 3 additions & 2 deletions spring-boot-samples/spring-boot-sample-ant/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?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">
<!-- This POM is just to trigger the Ant/Ivy sample from Maven and to test -->
<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -103,4 +104,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
Original file line number Diff line number Diff line change
@@ -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");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -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");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -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");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -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");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -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");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -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");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -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");
* you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 4080035

Please sign in to comment.