Commit 7eb58558 by Spencer Gibb

fix resource filtering so it works with boot 1.3.x

get's eureka branding back. fixes gh-627
parent d954a5c5
......@@ -14,7 +14,7 @@
<properties>
<main.basedir>${basedir}/..</main.basedir>
<spring-cloud.version>1.1.0.BUILD-SNAPSHOT</spring-cloud.version>
<wro4j.version>1.7.6</wro4j.version>
<wro4j.version>1.7.9</wro4j.version>
</properties>
<dependencies>
<dependency>
......
<groups xmlns="http://www.isdc.ro/wro">
<group name="wro">
<css>webjar:bootstrap/3.2.0/less/bootstrap.less</css>
<css>file:${project.basedir}/src/main/wro/main.less</css>
<css>webjar:bootstrap/3.2.0/less/bootstrap.less</css>
<css>file:@.project.basedir.@/src/main/wro/main.less</css>
<js>webjar:jquery/2.1.1/jquery.min.js</js>
<js>webjar:bootstrap/3.2.0/js/bootstrap.min.js</js>
</group>
......
......@@ -16,10 +16,6 @@
package org.springframework.cloud.netflix.eureka.server;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import java.util.Collections;
import java.util.Map;
......@@ -42,6 +38,11 @@ import org.springframework.http.ResponseEntity;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = Application.class)
@WebAppConfiguration
......@@ -91,4 +92,15 @@ public class ApplicationTests {
assertNotNull(body);
assertFalse("basePath contains double slashes", body.contains(basePath + "/"));
}
@Test
public void cssParsedByLess() {
String basePath = "http://localhost:" + this.port + "/eureka/css/wro.css";
ResponseEntity<String> entity = new TestRestTemplate().getForEntity(basePath,
String.class);
assertEquals(HttpStatus.OK, entity.getStatusCode());
String body = entity.getBody();
assertNotNull(body);
assertTrue("css wasn't preprocessed", body.contains("spring-logo"));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment