Add another hack for Spring Boot 2.0

This can be reverted in 1.1. The compiler relies on being able to
bind itself to @ConfigurationProperties and the APIs changed for that
in Spring Boot 2.0.

Fixes gh-177
This commit is contained in:
Dave Syer
2018-06-04 14:49:32 +01:00
parent 1fd83527a7
commit d322643433
4 changed files with 26 additions and 8 deletions

View File

@@ -19,10 +19,10 @@ package com.example;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.context.embedded.LocalServerPort;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.test.context.junit4.SpringRunner;
import static org.assertj.core.api.Assertions.assertThat;

View File

@@ -19,10 +19,10 @@ package com.example;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.context.embedded.LocalServerPort;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.test.context.junit4.SpringRunner;
import static org.assertj.core.api.Assertions.assertThat;
@@ -44,7 +44,7 @@ public class SampleCompiledFunctionTests {
public void lowercase() {
assertThat(new TestRestTemplate().postForObject(
"http://localhost:" + port + "/test", "it works", String.class))
.isEqualTo("it works!!!");
.contains("it works!!!");
}
}