Created
July 25, 2016 03:23
-
-
Save cofemei/9c80c2615609abab999be67da378642d to your computer and use it in GitHub Desktop.
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
import com.alibaba.druid.support.http.StatViewServlet | |
import grails.boot.GrailsApp | |
import grails.boot.config.GrailsAutoConfiguration | |
import org.springframework.boot.context.embedded.ServletRegistrationBean | |
import org.springframework.context.annotation.Bean | |
class Application extends GrailsAutoConfiguration { | |
@Bean | |
public ServletRegistrationBean statViewServlet() { | |
ServletRegistrationBean reg = new ServletRegistrationBean(); | |
reg.setServlet(new StatViewServlet()); | |
reg.addUrlMappings("/druid/*"); | |
return reg; | |
} | |
static void main(String[] args) { | |
GrailsApp.run(Application, args) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment