Springboot Application exits immediately
When I run my spring boot application , it exits immediately (with exit code 0) with this:
\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |___, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.1.0.RELEASE)
2018-11-27 14:08:31.219 INFO 94920 --- [ restartedMain] c.springbootsecurity.jwt.JwtApplication : Starting JwtApplication on 1000810002637M.local with PID 94920 (/Users/723305/Documents/spring/springbootSecure/target/classes started by 723305 in /Users/723305/Documents/spring/springbootSecure)
2018-11-27 14:08:31.222 INFO 94920 --- [ restartedMain] c.springbootsecurity.jwt.JwtApplication : No active profile set, falling back to default profiles: default
2018-11-27 14:08:31.252 INFO 94920 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2018-11-27 14:08:31.722 INFO 94920 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2018-11-27 14:08:31.743 INFO 94920 --- [ restartedMain] c.springbootsecurity.jwt.JwtApplication : Started JwtApplication in 0.752 seconds (JVM running for 1.294)
Process finished with exit code 0
my pom.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.springbootSecurity</groupId>
<artifactId>jwt</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>jwt</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
spring spring-boot intellij-idea
|
show 1 more comment
When I run my spring boot application , it exits immediately (with exit code 0) with this:
\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |___, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.1.0.RELEASE)
2018-11-27 14:08:31.219 INFO 94920 --- [ restartedMain] c.springbootsecurity.jwt.JwtApplication : Starting JwtApplication on 1000810002637M.local with PID 94920 (/Users/723305/Documents/spring/springbootSecure/target/classes started by 723305 in /Users/723305/Documents/spring/springbootSecure)
2018-11-27 14:08:31.222 INFO 94920 --- [ restartedMain] c.springbootsecurity.jwt.JwtApplication : No active profile set, falling back to default profiles: default
2018-11-27 14:08:31.252 INFO 94920 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2018-11-27 14:08:31.722 INFO 94920 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2018-11-27 14:08:31.743 INFO 94920 --- [ restartedMain] c.springbootsecurity.jwt.JwtApplication : Started JwtApplication in 0.752 seconds (JVM running for 1.294)
Process finished with exit code 0
my pom.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.springbootSecurity</groupId>
<artifactId>jwt</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>jwt</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
spring spring-boot intellij-idea
Please add more detail. You've just post a lot of code and yourpom, we don't know the situation and what you've tried yet
– enamoria
Nov 27 '18 at 3:28
So , I created an app using spring initialiser and tried to run it , it displays the above message . Most of the posts on google suggests to remove <scope>provider</scope> for dependency tomcat , but I don't have it
– G. Chohan
Nov 27 '18 at 3:44
1
You don't show your main(), or any of your own beans? Is there any code of yours in there?
– moilejter
Nov 27 '18 at 3:56
@moilejter no , I just created the application using springinitializer and it doesn't even run . I only have the main class. ` @SpringBootApplication public class JwtApplication { public static void main(String args) { SpringApplication.run(JwtApplication.class, args); } }`
– G. Chohan
Nov 27 '18 at 4:02
stackoverflow.com/questions/32758996/… . I think this will help u.
– Shalika
Nov 27 '18 at 4:22
|
show 1 more comment
When I run my spring boot application , it exits immediately (with exit code 0) with this:
\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |___, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.1.0.RELEASE)
2018-11-27 14:08:31.219 INFO 94920 --- [ restartedMain] c.springbootsecurity.jwt.JwtApplication : Starting JwtApplication on 1000810002637M.local with PID 94920 (/Users/723305/Documents/spring/springbootSecure/target/classes started by 723305 in /Users/723305/Documents/spring/springbootSecure)
2018-11-27 14:08:31.222 INFO 94920 --- [ restartedMain] c.springbootsecurity.jwt.JwtApplication : No active profile set, falling back to default profiles: default
2018-11-27 14:08:31.252 INFO 94920 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2018-11-27 14:08:31.722 INFO 94920 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2018-11-27 14:08:31.743 INFO 94920 --- [ restartedMain] c.springbootsecurity.jwt.JwtApplication : Started JwtApplication in 0.752 seconds (JVM running for 1.294)
Process finished with exit code 0
my pom.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.springbootSecurity</groupId>
<artifactId>jwt</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>jwt</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
spring spring-boot intellij-idea
When I run my spring boot application , it exits immediately (with exit code 0) with this:
\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |___, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.1.0.RELEASE)
2018-11-27 14:08:31.219 INFO 94920 --- [ restartedMain] c.springbootsecurity.jwt.JwtApplication : Starting JwtApplication on 1000810002637M.local with PID 94920 (/Users/723305/Documents/spring/springbootSecure/target/classes started by 723305 in /Users/723305/Documents/spring/springbootSecure)
2018-11-27 14:08:31.222 INFO 94920 --- [ restartedMain] c.springbootsecurity.jwt.JwtApplication : No active profile set, falling back to default profiles: default
2018-11-27 14:08:31.252 INFO 94920 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2018-11-27 14:08:31.722 INFO 94920 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2018-11-27 14:08:31.743 INFO 94920 --- [ restartedMain] c.springbootsecurity.jwt.JwtApplication : Started JwtApplication in 0.752 seconds (JVM running for 1.294)
Process finished with exit code 0
my pom.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.springbootSecurity</groupId>
<artifactId>jwt</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>jwt</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
spring spring-boot intellij-idea
spring spring-boot intellij-idea
edited Nov 27 '18 at 3:42
enamoria
617621
617621
asked Nov 27 '18 at 3:16
G. ChohanG. Chohan
11
11
Please add more detail. You've just post a lot of code and yourpom, we don't know the situation and what you've tried yet
– enamoria
Nov 27 '18 at 3:28
So , I created an app using spring initialiser and tried to run it , it displays the above message . Most of the posts on google suggests to remove <scope>provider</scope> for dependency tomcat , but I don't have it
– G. Chohan
Nov 27 '18 at 3:44
1
You don't show your main(), or any of your own beans? Is there any code of yours in there?
– moilejter
Nov 27 '18 at 3:56
@moilejter no , I just created the application using springinitializer and it doesn't even run . I only have the main class. ` @SpringBootApplication public class JwtApplication { public static void main(String args) { SpringApplication.run(JwtApplication.class, args); } }`
– G. Chohan
Nov 27 '18 at 4:02
stackoverflow.com/questions/32758996/… . I think this will help u.
– Shalika
Nov 27 '18 at 4:22
|
show 1 more comment
Please add more detail. You've just post a lot of code and yourpom, we don't know the situation and what you've tried yet
– enamoria
Nov 27 '18 at 3:28
So , I created an app using spring initialiser and tried to run it , it displays the above message . Most of the posts on google suggests to remove <scope>provider</scope> for dependency tomcat , but I don't have it
– G. Chohan
Nov 27 '18 at 3:44
1
You don't show your main(), or any of your own beans? Is there any code of yours in there?
– moilejter
Nov 27 '18 at 3:56
@moilejter no , I just created the application using springinitializer and it doesn't even run . I only have the main class. ` @SpringBootApplication public class JwtApplication { public static void main(String args) { SpringApplication.run(JwtApplication.class, args); } }`
– G. Chohan
Nov 27 '18 at 4:02
stackoverflow.com/questions/32758996/… . I think this will help u.
– Shalika
Nov 27 '18 at 4:22
Please add more detail. You've just post a lot of code and your
pom, we don't know the situation and what you've tried yet– enamoria
Nov 27 '18 at 3:28
Please add more detail. You've just post a lot of code and your
pom, we don't know the situation and what you've tried yet– enamoria
Nov 27 '18 at 3:28
So , I created an app using spring initialiser and tried to run it , it displays the above message . Most of the posts on google suggests to remove <scope>provider</scope> for dependency tomcat , but I don't have it
– G. Chohan
Nov 27 '18 at 3:44
So , I created an app using spring initialiser and tried to run it , it displays the above message . Most of the posts on google suggests to remove <scope>provider</scope> for dependency tomcat , but I don't have it
– G. Chohan
Nov 27 '18 at 3:44
1
1
You don't show your main(), or any of your own beans? Is there any code of yours in there?
– moilejter
Nov 27 '18 at 3:56
You don't show your main(), or any of your own beans? Is there any code of yours in there?
– moilejter
Nov 27 '18 at 3:56
@moilejter no , I just created the application using springinitializer and it doesn't even run . I only have the main class. ` @SpringBootApplication public class JwtApplication { public static void main(String args) { SpringApplication.run(JwtApplication.class, args); } }`
– G. Chohan
Nov 27 '18 at 4:02
@moilejter no , I just created the application using springinitializer and it doesn't even run . I only have the main class. ` @SpringBootApplication public class JwtApplication { public static void main(String args) { SpringApplication.run(JwtApplication.class, args); } }`
– G. Chohan
Nov 27 '18 at 4:02
stackoverflow.com/questions/32758996/… . I think this will help u.
– Shalika
Nov 27 '18 at 4:22
stackoverflow.com/questions/32758996/… . I think this will help u.
– Shalika
Nov 27 '18 at 4:22
|
show 1 more comment
2 Answers
2
active
oldest
votes
I don't see any issues with this.
Process finished with exit code 0
This says process ended happily.
Given your application is not having spring-boot-starter-web dependency then it won't be starting any server and not waiting for any request.
It is very much similar to a main method which does not have anything to execute or finishes as soon as main code completes.
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency>. even this doesn't work
– G. Chohan
Nov 27 '18 at 5:51
ok do you still get the same logs ? Any logs like "tomcat started on port 8080" not coming ?
– bittu
Nov 27 '18 at 6:27
no , nothing comes up , still the same output
– G. Chohan
Nov 28 '18 at 1:01
Very strange. Seems like web dependency is not added to your classpath. Can you just reimport all dependency of your module and restart the application.
– bittu
Nov 28 '18 at 2:17
Executing maven clean install will reimport all dependency
– bittu
Nov 28 '18 at 2:24
add a comment |
Because of you spring boot in pom.xml you did not declare as starter web project it will
shut down immediately, it is an expected behavior, now to run as web container you need to add below code in your pom.xml.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53492213%2fspringboot-application-exits-immediately%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I don't see any issues with this.
Process finished with exit code 0
This says process ended happily.
Given your application is not having spring-boot-starter-web dependency then it won't be starting any server and not waiting for any request.
It is very much similar to a main method which does not have anything to execute or finishes as soon as main code completes.
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency>. even this doesn't work
– G. Chohan
Nov 27 '18 at 5:51
ok do you still get the same logs ? Any logs like "tomcat started on port 8080" not coming ?
– bittu
Nov 27 '18 at 6:27
no , nothing comes up , still the same output
– G. Chohan
Nov 28 '18 at 1:01
Very strange. Seems like web dependency is not added to your classpath. Can you just reimport all dependency of your module and restart the application.
– bittu
Nov 28 '18 at 2:17
Executing maven clean install will reimport all dependency
– bittu
Nov 28 '18 at 2:24
add a comment |
I don't see any issues with this.
Process finished with exit code 0
This says process ended happily.
Given your application is not having spring-boot-starter-web dependency then it won't be starting any server and not waiting for any request.
It is very much similar to a main method which does not have anything to execute or finishes as soon as main code completes.
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency>. even this doesn't work
– G. Chohan
Nov 27 '18 at 5:51
ok do you still get the same logs ? Any logs like "tomcat started on port 8080" not coming ?
– bittu
Nov 27 '18 at 6:27
no , nothing comes up , still the same output
– G. Chohan
Nov 28 '18 at 1:01
Very strange. Seems like web dependency is not added to your classpath. Can you just reimport all dependency of your module and restart the application.
– bittu
Nov 28 '18 at 2:17
Executing maven clean install will reimport all dependency
– bittu
Nov 28 '18 at 2:24
add a comment |
I don't see any issues with this.
Process finished with exit code 0
This says process ended happily.
Given your application is not having spring-boot-starter-web dependency then it won't be starting any server and not waiting for any request.
It is very much similar to a main method which does not have anything to execute or finishes as soon as main code completes.
I don't see any issues with this.
Process finished with exit code 0
This says process ended happily.
Given your application is not having spring-boot-starter-web dependency then it won't be starting any server and not waiting for any request.
It is very much similar to a main method which does not have anything to execute or finishes as soon as main code completes.
answered Nov 27 '18 at 5:31
bittubittu
367110
367110
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency>. even this doesn't work
– G. Chohan
Nov 27 '18 at 5:51
ok do you still get the same logs ? Any logs like "tomcat started on port 8080" not coming ?
– bittu
Nov 27 '18 at 6:27
no , nothing comes up , still the same output
– G. Chohan
Nov 28 '18 at 1:01
Very strange. Seems like web dependency is not added to your classpath. Can you just reimport all dependency of your module and restart the application.
– bittu
Nov 28 '18 at 2:17
Executing maven clean install will reimport all dependency
– bittu
Nov 28 '18 at 2:24
add a comment |
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency>. even this doesn't work
– G. Chohan
Nov 27 '18 at 5:51
ok do you still get the same logs ? Any logs like "tomcat started on port 8080" not coming ?
– bittu
Nov 27 '18 at 6:27
no , nothing comes up , still the same output
– G. Chohan
Nov 28 '18 at 1:01
Very strange. Seems like web dependency is not added to your classpath. Can you just reimport all dependency of your module and restart the application.
– bittu
Nov 28 '18 at 2:17
Executing maven clean install will reimport all dependency
– bittu
Nov 28 '18 at 2:24
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency>. even this doesn't work
– G. Chohan
Nov 27 '18 at 5:51
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency>. even this doesn't work
– G. Chohan
Nov 27 '18 at 5:51
ok do you still get the same logs ? Any logs like "tomcat started on port 8080" not coming ?
– bittu
Nov 27 '18 at 6:27
ok do you still get the same logs ? Any logs like "tomcat started on port 8080" not coming ?
– bittu
Nov 27 '18 at 6:27
no , nothing comes up , still the same output
– G. Chohan
Nov 28 '18 at 1:01
no , nothing comes up , still the same output
– G. Chohan
Nov 28 '18 at 1:01
Very strange. Seems like web dependency is not added to your classpath. Can you just reimport all dependency of your module and restart the application.
– bittu
Nov 28 '18 at 2:17
Very strange. Seems like web dependency is not added to your classpath. Can you just reimport all dependency of your module and restart the application.
– bittu
Nov 28 '18 at 2:17
Executing maven clean install will reimport all dependency
– bittu
Nov 28 '18 at 2:24
Executing maven clean install will reimport all dependency
– bittu
Nov 28 '18 at 2:24
add a comment |
Because of you spring boot in pom.xml you did not declare as starter web project it will
shut down immediately, it is an expected behavior, now to run as web container you need to add below code in your pom.xml.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
add a comment |
Because of you spring boot in pom.xml you did not declare as starter web project it will
shut down immediately, it is an expected behavior, now to run as web container you need to add below code in your pom.xml.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
add a comment |
Because of you spring boot in pom.xml you did not declare as starter web project it will
shut down immediately, it is an expected behavior, now to run as web container you need to add below code in your pom.xml.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
Because of you spring boot in pom.xml you did not declare as starter web project it will
shut down immediately, it is an expected behavior, now to run as web container you need to add below code in your pom.xml.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
answered Nov 27 '18 at 6:29
Himesh goswamiHimesh goswami
660316
660316
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53492213%2fspringboot-application-exits-immediately%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Please add more detail. You've just post a lot of code and your
pom, we don't know the situation and what you've tried yet– enamoria
Nov 27 '18 at 3:28
So , I created an app using spring initialiser and tried to run it , it displays the above message . Most of the posts on google suggests to remove <scope>provider</scope> for dependency tomcat , but I don't have it
– G. Chohan
Nov 27 '18 at 3:44
1
You don't show your main(), or any of your own beans? Is there any code of yours in there?
– moilejter
Nov 27 '18 at 3:56
@moilejter no , I just created the application using springinitializer and it doesn't even run . I only have the main class. ` @SpringBootApplication public class JwtApplication { public static void main(String args) { SpringApplication.run(JwtApplication.class, args); } }`
– G. Chohan
Nov 27 '18 at 4:02
stackoverflow.com/questions/32758996/… . I think this will help u.
– Shalika
Nov 27 '18 at 4:22