Mock implementation for void method

17. февраля 2017 JAVA, Test 0
When you want replace implementation method in test, you can use Mockito. doAnswer(new Answer() { public Object answer(InvocationOnMock invocation){ Object[] args = invocation.getArguments(); Mock mock = invocation.getMock(); return null; } }).when(mock).someMethodWithParameter(Matchers.any(),Matchers.any(User.class));

Hot change frontend when use Spring Boot

16. февраля 2017 JAVA, Spring 0
It need when you want edit frontend (html, jsp and other) and show this changes without restarting app. add spring-boot-devtools in dependencies In maven: <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> </dependency> </dependencies>