Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Intellij to launch browser automatically after spring-boot webapp is ready

I just switched a Spring Boot webapp from an external war deploy in Tomcat to a direct jar deploy with Spring Boot (and its internal Tomcat).

For Tomcat Run/Debug Configurations, Intellij gives you the to open browser after launch and go to http://localhost:8080/.

How can I do something similar with a a Spring Boot RUn/Debug Configuration. It runs the main class and just waits until I go to localhost:8080 from the browser myself.

like image 608
jnash67 Avatar asked Feb 14 '16 03:02

jnash67


1 Answers

edit your run/debug configurations in the bottom - click on '+' right above 'Build' select 'launch web browser', put your app url, for example http://localhost:8181 enter image description here

so you will have enter image description here

click apply/ok, with that when you click Run/play button, it will launch browser with your url after the build

like image 179
Sasha Bond Avatar answered Sep 19 '22 22:09

Sasha Bond