I've received the message "Process finished with exit code 1" when I run my project. I have tried several solutions but no topic is the same error as mine. My project doesn't execute any line of code, just abort the process.
8 Answers
You must set logging.level.root
to DEBUG
and read related logging to find problem.
if your app uses application.yml file, add (or edit) this at beginning or end:
logging:
level:
root: DEBUG
if your app uses application.properties
, add (or edit) below line:
logging.level.root: DEBUG
for example, my app uses an undefined property and does not show the problem in common logs, after enabling debug level logging, I got below line in logs:
Could not find key 'app.services.account.service' in any property source
I encounter the same problem. Springboot exits with code 1 without error. But that was when I created a project without using Spring Initializer.
I suggest you backup your code and recreate the project with Spring Initializer (service URL: https://start.spring.io), that should work. and you will be able to compare the setup difference.
Its very complicated because mostly it might happen due to missing of properties. In my case the below property not defined in application.properties which cause this issue and its clue less. Hope this will help you
Due to missing properties like server port or any other placeholder which is defined in any Bean or Component can cause this issue. verify all the properties and placeholders.
@Value(value = "${resource.path.accountNumbers}")
private Resource accountNumbers;
application.properties--verify all properties/placeholders
resource.path.accountNumbers=classpath:accountNumbers.properties
cmd.exe
? - CrazyCoder