Skip to content
Advertisement

Tag: spring-web

How to print to console in Spring Boot Web Application

Coming from a Node background, what is the equivalent of console.log() in spring boot? For example I’d like to see in my console the job info in the following method. System.out.println(); is how I know to do it in Java but it doesn’t seem to appear in my console. Using IntelliJ. Answer System.out.println(job); like you have done. It prints something

Overriding beans in Integration tests

For my Spring-Boot app I provide a RestTemplate though a @Configuration file so I can add sensible defaults(ex Timeouts). For my integration tests I would like to mock the RestTemplate as I dont want to connect to external services – I know what responses to expect. I tried providing a different implementation in the integration-test package in the hope that

Advertisement