Spring Boot app deployed to Glassfish is giving strange results

This has been answered here: https://stackoverflow.com/a/29438821/508247

There is a bug in Glassfish 3.1.X. You need to include metadata-complete="true" in your web.xml root element.

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" 
     metadata-complete="true"
     xmlns="http://xmlns.jcp.org/xml/ns/javaee" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
</web-app>