Created
May 3, 2018 06:43
-
-
Save k33g/373f9cc7eaa65313ef1fbaadcf0fadf9 to your computer and use it in GitHub Desktop.
RedPipe 1er contact
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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