Wednesday, February 14, 2018

How to make @requestparam optional in spring

Question: Make spring endpoint with optional request parameters Solution: To make the request parameter optional on the spring controller, user JAVA 8 feature Option type or set required attribute to false. public void count(@RequestParam(name="name") Optional name){ if (name.isPresent()) { ...

Sunday, February 11, 2018

@angular/platform-browser/src/browser/transfer_state.d.ts (34,40): ',' expected.

Error: `ERROR in [at-loader] ./node_modules/@angular/platform-browser/src/browser/transfer_state.d.ts:34:40 TS1005: ',' expected. ERROR in [at-loader] ./node_modules/@angular/platform-browser/src/browser/transfer_state.d.ts:34:42 TS1139: Type parameter declaration expected. ERROR in [at-loader]...

Monday, February 5, 2018