Problem Description:
When this problem occurs, there is no output from the console, and the process exits Process finished with exit code 1
problem solved:
Use try catch to catch the exception and find that there is still no log
public static void main( String [] args) {
try {
SpringApplication.run(ApiBdszApplication. class , args);
} catch ( Exception e){
e.printStackTrace();
}
}
But as a Java programmer with countless pits, we know that Exception is not the top exception class, so we replaced it with Throwable
public static void main( String [] args) {
try {
SpringApplication.run(ApiBdszApplication. class , args);
} catch ( Throwable e){
e.printStackTrace();
}
}
At this time, except for the error content in the log printing, follow the log prompts to solve
At last
During the search for this problem, I read many online solutions, and finally came up with three solutions:
1. Use the above capture method
2. Check whether the springboot version and springcloud version match
3. Check whether you have written some configuration files wrong.
Read More:
- Android Studio Warning: Process ‘command ‘git‘‘ finished with non-zero exit value 1
- [Solved] IOS Error: Command MergeSwiftModule failed with a nonzero exit code
- [Solved] no identity found – Command CodeSign failed with a nonzero exit code
- Ubutnu Qt Unable to start process Error: “make“ -f ‘ /usr/bin/ld: cannot find -lGL collect2: error: ld returned 1 exit sta
- Commit failed – exit code 1 received, with output: ‘>running pre-commit hook: npm run precommit (Fixed)
- [Solved] Vue gaiters console.log error: Unexpected console statement (no-console)
- [Solved] ECharts Console Error: `resize` should not be called during main process
- [Solved] Bat starts springboot project error: ERROR org.springframework.boot.SpringApplication -Application run failed
- DevC++ Error: [Error] Id returned 1 exit status [How to Solve]
- [Solved] prometheus Exception Exit Error: opening storage failed
- How to Solve forEach cannot exit the loop Issue
- NVM use error: exit status [How to Solve]
- When installing zookeeper, you can view the process start, but the status display error: Error contacting service. It is probably not running
- [Solved] Mac M1 Brew install Error: Command failed with exit 128:git
- [Solved] VsCode + gfortran Compiler Error: error: ld returned 1 exit status
- VSCode Error: collect2.exe:error:1d returned 1 exit status [How to Solve]
- vscode: Error loading workspace: err: exit status 1: stderr: build flag -mod=readonly only valid
- GCC Error:(.text+0x24): undefined reference to `main‘collect2: error: ld returned 1 exit status [Solved]
- Dev C++ Error: error: ld returned 1 exit status [How to Solve]
- [Solved] error adding symbols: File in wrong format collect2: error: ld returned 1 exit status