BUG REPORT: Springboot API returns "Failed to connect to localhost port 4001: Connection refused"


The API totally stops working and refuses to be seen when CURLing. Others have stated this issue and Codecademy has done nothing to fix it.


I’m getting this error on this step:

To ensure that this sample data is loaded, find the application.properties file and change spring.datasource.initialization-mode=never to spring.datasource.initialization-mode=always

DevTools console says port closed before reply received, CURL says connection refused.

I’ve reset multiple times and checked at each stage where the connection was cutting out. It seems to be this step + changing the @GetMapping from throw new ImplementationError to return this.bootsRepository.findAll() (code below):

	public Iterable<Boot> getAllBoots() {
		return this.bootRepository.findAll();

		// throw new NotImplementedException("Don't have the ability to list all boots yet!");
1 Like