Created
December 1, 2018 12:00
-
-
Save luke10x/b64dbc88612f39fbd2cc073aa2aaa6e0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 com.discoverops.roleplay; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.EnableAutoConfiguration; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| import org.springframework.boot.web.servlet.FilterRegistrationBean; | |
| import org.springframework.boot.web.servlet.ServletComponentScan; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.web.bind.annotation.RequestMapping; | |
| import org.springframework.web.bind.annotation.RestController; | |
| @SpringBootApplication | |
| @ServletComponentScan | |
| @RestController | |
| @EnableAutoConfiguration | |
| public class RoleplayApplication { | |
| @RequestMapping("/") | |
| String hello() { | |
| return "hello world"; | |
| } | |
| public static void main(String[] args) { | |
| SpringApplication.run(RoleplayApplication.class, args); | |
| } | |
| @Bean | |
| public FilterRegistrationBean<JWTAuthorizationFilter> dawsonApiFilter() { | |
| FilterRegistrationBean<JWTAuthorizationFilter> registration = new FilterRegistrationBean<JWTAuthorizationFilter>(); | |
| registration.setFilter(new JWTAuthorizationFilter()); | |
| return registration; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment