KHKen Huinkenhu.hashnode.dev·Jun 14, 2022 · 1 min readBack to SlackwareWhen I studied in college as a graduated student, the professor will help us to build a linux machine for running numerical computations. During that time, the so-called "Linux" generally means "Slackware". After that, I spend most of time in Debian,...00
KHKen Huinkenhu.hashnode.dev·Jun 12, 2021 · 1 min readBatch rename files by shellToday I have a lot of screenshot images need to be rename. Well , it seems to be an easy task, but the space characters inside file names cause a little trouble. If I define a bash function in command line directly, it works well: cnf(){ files=$(ls -...00
KHKen Huinkenhu.hashnode.dev·Oct 21, 2020 · 4 min readSpring RestTemplate treats Non-200 status as ExceptionRecently I run into the following code snippets: ResponseEntity<ApmTopoResponse> response2 = null; try { response2 = restTemplate.exchange(topoUrl, HttpMethod.GET, request, ApmTopoResponse.class, 1); } catch (Exception e) { throw new CustomExcept...00
KHKen Huinkenhu.hashnode.dev·May 4, 2020Spring Cloud Gateway Global CorsRecently I am working on a new project using spring cloud to build a microservices architecture application. Because the frontend (vue.js app) needs to talk to the backend rest services, so we need to enable cors headers at the api gateway. The offi...00
KHKen Huinkenhu.hashnode.dev·Apr 11, 2020Pure Junit 5 in maven moduleMixing junit 4 and junit 5 cause a little confusion, document says: If you are using JUnit 4, don’t forget to also add @RunWith(SpringRunner.class) to your test, otherwise the annotations will be ignored. If you are using JUnit 5, there’s no need to...00