Skip to content

Instantly share code, notes, and snippets.

@k33g
Created May 3, 2018 06:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k33g/373f9cc7eaa65313ef1fbaadcf0fadf9 to your computer and use it in GitHub Desktop.
Save k33g/373f9cc7eaa65313ef1fbaadcf0fadf9 to your computer and use it in GitHub Desktop.
RedPipe 1er contact
package garden.bots;
import net.redpipe.engine.resteasy.FileResource;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.core.Response;
import java.io.IOException;
@Path("/{path:(.*)?}")
public class StaticResource extends FileResource {
@GET
public Response index(@PathParam("path") String path) throws IOException {
return super.getFile(path.equals("") ? "index.html" : path);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment