Make sure chromedriver can run with Java selenium code, both in a real machine and in docker

Install chromedriver You want to make the following line of code run successfully. In windows, you need to download chrome driver from https://chromedriver.chromium.org/downloads and put it in system’s path (An alternative is to set the executable file’s path as a system property “webdriver.chrome.driver”, not beautiful) In *nix or linux-based Docker, you can Options needed for …

Make sure chromedriver can run with Java selenium code, both in a real machine and in docker Read More »

Opinion: Don’t use class for data structure in typescript (2019). Use interface only

Always use interfaces instead Problems of class: Lots of frameworks such as Redux don’t support class instances. They only support plain objects. There are tools that can convert plain objects to class instances, but the point below makes it awkward. Given a variable “someType: SomeType” in the code, you don’t know if it is a …

Opinion: Don’t use class for data structure in typescript (2019). Use interface only Read More »

Springfox for 204 response

What you need to, Return ResponseEntity<Void> Set the @ResponseStatus for your rest controller’s method If you don’t do that, you will get ResponseEntity as the response class in your swagger json, and you will get both 200 and 204 as your successful response code, which is not correct because your method only returns 204, no …

Springfox for 204 response Read More »