learning-spring-boot-2nd-edition-code
learning-spring-boot-2nd-edition-code copied to clipboard
Source code for Learning Spring Boot 2nd Edition
The following URL gives me a 404 http://localhost:8080/hystrix.stream I've enabled DEBUG and this shows up in the log ``` DEBUG 9152 --- [ctor-http-nio-2] .b.a.e.w.r.WebFluxEndpointHandlerMapping : Looking up handler method for...
Here is my settings: Spring Boot: 2.3.0.RELEASE    I have app working at Pivotal Cloud Foundry. I have runing Remote App localy and after...
Images are getting corrupted after the initial run of my application. On the 1st run the 3 sample images display on the screen and if I click an individual image...
HomeControllerTests gets me "ImageRepository bean not found". For me this version of annotation fixed the problem: @MockBeans({ @MockBean(ImageService.class), @MockBean(ImageRepository.class) }) public class HomeControllerTests { @Autowired WebTestClient webClient; @Autowired ImageService imageService;
Here is `BlockingHomeController` working example if you interest how to use `BlockingImageService`. Don't forget to use `@Service` annotation before "public class BlockingImageService" and "turn off" `HomeController` by simply commenting `@Controller`...
ERROR 1321 --- [nio-9000-exec-1] a.w.r.e.AbstractErrorWebExceptionHandler : [63a112d1] 500 Server Error for HTTP GET "/" java.lang.IllegalStateException: Iterator already obtained at java.base/sun.nio.fs.UnixDirectoryStream.iterator(UnixDirectoryStream.java:118) ~[na:na]
https://github.com/learning-spring-boot/learning-spring-boot-2nd-edition-code/blob/e9370679cdfcdb88747b216df84ea8925996dc4e/2/part2/src/main/java/com/greglturnquist/learningspringboot/ImageService.java#L76 For some reason createImage() throws this exception: java.nio.file.NoSuchFileException: upload-dir/sarah-crutchfield-549.jpg at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) ~[na:1.8.0_152] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[na:1.8.0_152] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[na:1.8.0_152] at sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:177) ~[na:1.8.0_152] at java.nio.channels.FileChannel.open(FileChannel.java:287) ~[na:1.8.0_152] at java.nio.channels.FileChannel.open(FileChannel.java:335) ~[na:1.8.0_152] at org.springframework.http.codec.multipart.SynchronossPartHttpMessageReader$SynchronossFilePart.transferTo(SynchronossPartHttpMessageReader.java:303)...
Cleared/reset RabbitQM queues and data. Zero errors even with debug logging turned on. I can see the new data going out from the Image service, but the new data does...
If you are using Java 9 then you will need to add these lines to your build.gradle for the Eureka project so that you do not get any errors compile...
If you are using JDK 9.0.x and are working with both the Comments and the Images packages in chapter 7 you will need to add the following Java Environment variable...