Set spring profile in IntelliJ
To set the spring profile in IntelliJ, just edit the configuration, usually spring-boot:run if you are using maven, or bootRun if you are using gradle, and a...
To set the spring profile in IntelliJ, just edit the configuration, usually spring-boot:run if you are using maven, or bootRun if you are using gradle, and a...
Now that we have successfully deployed the Common artifact to our Azure Artifacts Feed, we can set up the Main project to consume this dependency. This will ...
In enterprise projects, it is quite common to have references to other projects as dependency. However, the dependent project is not supposed to be on the pu...
While trying to push my project to Azure DevOps on my corporate windows machine, I got this error message when I am trying to push my code - SSL certificate ...
Like Angular, React is another popular library to build frontend single-page-applications. We can create a react app by using Create React App, run npx creat...
Creating a webservice with Spring is almost trivial, you usually won’t go wrong by following the tutorials. However, things can get tricky sometimes when you...
Ever since coming across gradle as the build tool for java while working in Zuhlke, I have never looked back to using Maven. The immediate difference is obvi...
I was just trying out to bootstrap a website with NextJS and I wanted to apply the Blog template from Material UI Getting Started Templates but it wasn’t as ...
We all know what is a function. It takes some or no inputs and produce just 1 output. function doSomething(input1, input2){ return input1 + input2; } Wh...
The implementation details of the java hashmap is a very common interview question for java developers, though I’m strongly against asking such question fo...
What is the purpose of the router-store in NgRx? As explained in my previous article on NgRx, the purpose of NgRx is to separate the data management part ...
TLDR; Create a @mixin to receive the $theme as a parameter, so that you can get the colors you need from the $theme and apply it to your css selectors. The...
Having your own theme in your web application is essential to make it look professional. Imagine using the default color themes provided from the framework y...
Ngrx is a framework for angular that helps to separate the backend logic from the frontend, making the code easier cleaner. To know more about how it works...
Often times, when our angular applications grows, our code become quite messy to follow. We have multiple components, referencing a myriad number of servic...
This is a simple method to call http using the HttpClientModule. getBooks(): Observable<Book[]>{ return this.http.get<Book[]>(BooksService.b...
Angular automatically creates 2 files - environment.ts and environment.prod.ts, in the environment folder when the project is first created. Both of them has...
When you create a new angular app using ng new <application name>, the first question you get asked is ? Would you like to add Angular routing? (y/N). ...
I just realised that in one of my previous posts, the code I had for ${{ secrets.GH_TOKEN }} became just $. After a bit of research, I found out that it is ...
The purpose of having Semantic-Release is so that we can release workable versions to our users frequently. So we shouldn’t be releasing non-workable version...
1. It doesn’t reflect the real world programming experience This can’t be more straightforward. When is the last time anyone need to solve a secondary schoo...
While working in a team, there are usually some naming conventions for the branches, like prefixing the branch with “feat/” for feature branch, or “fix/” for...
What is Angular? In my opinion, Angular is the platform and framework for building your own customized html tags. While html has a fixed set of tags (e.g. &...
After you have created your application, it is always nice to have it containerized so that it can be readily used whenever you need it, without having to cl...
Recently, I chanced upon this neat solution to a rather simple interview question, that exploits the special property of the binary XOR operation. It leads m...
What is Homebrew Homebrew is the missing package manager for macOS. What does that mean? In layman terms, it is like the Appstore, but for opensource softwa...
Sometimes we have some configuration data that we need in our code, that can be changed periodically, like mail server information, proxy server, etc. We can...
I used to be able to type accented characters on Mac OSX by long pressing the character I want to accent. But this functionality was somehow gone after an OS...
Spring makes it extremely easy to create REST api, but as a consumer of APIs, we need documentations to know what is available and how to use it. That’s wher...
I’m slow…. It’s been a while since I last touched my Angular repository, that was created in early 2020, running on Angular 11. When I just went back to it y...
Generics makes it possible to reuse code, which is great. But when it needs to apply on a JPA repository, it can get messy. As any small mistake is going to ...
Use getById() if you just want to get a reference of the entity, like assigning it to a property of another entity. Use findById() if you actually want to g...
A little discovery I found recently. My error messages are not showing as intended. @PostMapping @ResponseStatus(HttpStatus.CREATED) fun createAccount(@Requ...
When working in a team, someone will be using windows, while some will be on mac. Usually, it won’t be an issue, but windows and mac/linux has a different wa...
Sometimes it can be pretty frustrating when the error message doesn’t show the root cause of the problem, usually that’s because it is not straightforward wh...
When it comes to releasing software projects to production, versioning can be a topic that is easily overlooked as something that is too trivial and done man...
Cucumber is a great way for users to automate acceptance testing, as it allows using somewhat natural language to define the test cases. With a little learni...
In the project I’m working on, there are some local configurations (typically database connection strings) that I do not push to the git remote. This causes ...
Recently github has discontinued the using of username and password - https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/. S...
I am building a fix for the current release of a project, so the fix branch should branch out from the current master branch like this: However, as I was ...
Lombok is a pretty neat tool when coding in Java, allowing me to save time writing repetitive codes. But when you are installing it in a new project or in a ...
A simple explanation of the use of machine learning, is the prediction of result based on past data. In order to do that, you’ll need a lot of data, because ...
Recently, I was involved to setup the e2e testing for the project at work. It’s usually a straightforward process to install cypress and get the test cases w...
NextJS is a React framework that is great for static site generation, as it has the structure to pre-render the pages, provide routing, and bundling with web...
After creating the production build for an Angular project with ng build --prod, the output is a folder of html and javascript, which will only work if you s...
There are some requirements that a module needs to fullfil before it can be published to npm. For example, you’ll need a main field in your package.json http...
Archetypes make it easy to scaffold a project, but remembering all the archetypes available and using the command line to activate it can be challenging to r...
This happens when I forgot to create the .gitignore file, resulting in the target folder containing the class files got uploaded to git. Solution git rm -r...
It occurs to me a few times when I have written my code, then I want to create a git repository to store it. Then I selected the option to create a README fi...
This is an extension to the articles - Getting started with Spring and GraphQl and Integration testing on Spring Boot GraphQL Starter with HttpGraphQlTester....
Following my previous article on getting started with spring and graphql, let’s look at how we can do integration testing on the graphql spring boot applicat...
The most common way of creating APIs is using REST (Representational State Transfer), of which we make use of the http verbs (POST, GET, PUT, DELETE) to stat...
In traditional application development, we have everything under a single project. But when the project gets bigger, involving multiple teams, it might make ...
NestJS is a nodejs framework for building backend applications, that is secure and scaleable. Following the SOLID principle, and having a modular architectur...
Following my last article on creating OpenID Connect login with Spring Boot, we shall now enhance the application to create a user in our MongoDB database fo...
OpenID Connect (OIDC) is an identity authentication protocol, using the mechanism of OAuth2, to allow applications to delegate their login function to identi...
When we have an application that collects inputs from users, we usually need to have some validation checks to ensure user inputs are within what is expected...
Validating user inputs is not a difficult task, but it is rather cumbersome. Although essential, having lots of validation checks in the code makes the code ...
Continuing my previous article configuring CSRF with Spring Security, this time we are going to configure the authentication. Spring security provides all th...
Lombok makes life easier for java developers by generating the mundane code (e.g. getters and setters) automatically, but if you are running code coverage, y...
Today we are going to work on adding Spring Security to our Spring boot application. To start, we will first need to add the dependencies for Spring Securit...
In today’s environment, when we are having tons of dependencies in our application project, as developers we need to take care not just of the business logic...
Unlike unit tests where we should be isolating the test to just the codes in the function we are testing, integration tests is meant to test the full spectru...
Spring provides the @WebMvcTest annotation for testing Spring MVC components, providing only the configuration relevant to the MVC tests and not the full aut...
Unit testing services is easy, cause we don’t need to set up any application context in Spring, since the purpose of unit testing is just to isolate testing ...
Usually we do not need to write tests for the functionalities provided by the framework, but we can do so when certain functionalities we use from the framew...
In my last post - Getting started Spring Boot Application, I demonstrated how to create a sample forum application with Spring Boot using MariaDB as the data...
Frameworks have made developing backend applications much easier compared to doing everything manually. For example, we no longer need to deal with the http ...
I thought it should be pretty straightforward, since the AWS amplify documentation mentions it supports NextJS out of the box. However, when I try to deploy ...
Angular is a javascript framework for creating websites. Instead of using regular html tags (like div, span, form, input), Angular lets you define new html t...
Amazon Web Services Serverless Application Model (AWS SAM) is a platform to help developers quick-start a lambda application with all the essentials and basi...
When we need to test our spring boot application that is running MongoDB, it will by default connect to the MongoDB instance with the connection details in o...
MariaDB is a community-driven fork of the then open sourced MySql which was acquired by Oracle, and it is created by the original developers of MySql, and is...
Why do we need to squash commits Sometimes when we are working on a feature, we might forget to run all the tests before we commit, and we could get test fa...
What is Git Rebase The git rebase is a command in Git that allows you to modify the commit history of a branch by moving or combining a sequence of commits ...
In my previous article on how to add Swagger on Spring with Kotlin, the examples were built on Spring 2. With the introduction of Spring 3, there are some up...
When working in the corporate environment, we usually have a designated user space for each authenticated user on our computer. For example, in Windows, if...
If you are running git on windows, with a deeply nested folder structure in your code, you might get the error message - “Filename too long”. That is because...
Reminder to self: When trying to get the options in the MatSelectHarness in Angular Material, you need to simulate a click on the MatSelectHarness - await se...
I am creating an angular template whereby I can create forms from a data file automatically, such as a json or yaml. For displaying on the monitor screen, ...
Java stream is a wonderful addition since Java 8 to create and manipulate arrays/lists with ease. However, as other new programming languages can do all the ...
// Initialize Arrays Integer[] integerArray = {1, 2, 3, 4, 5}; System.out.println(Arrays.toString(integerArray)); // Initialize List List<Integer> int...
Beyond just ensuring every line of code is executed with Code Coverage test, there is another way to ensure the test cases written are adequate, and that is ...
Testing is a very important process in software engineering to ensure the quality of the code we write, and we can ensure testing is adequate by doing code c...
Unit testing has been the quintessential way to ensure whatever code we add to our program doesn’t break anything, but how do we tell if the unit tests are a...
Dependency Injection is like a job matching service for variables in your code. You specify the job description, in the form of interface, or in a less ideal...
The SOLID principle is one of the most common acronym to describe the principles of object-oriented programming, which is subset of the many principles intro...
I’ve got my certification in PMP back in 2017, when the PMBOK is at the 5th edition. So recently I had a quick review of the new 6th edition, and here are my...
My ingredient list for good code Ample documentation Automated testing with good coverage Clean, legible and side-effect free Second opinion (code ...
My take from the article - https://hbr.org/2018/07/how-consultants-project-expertise-and-learn-at-the-same-time Consultants might not always have the in-dep...
Noticed a small issue while using jackson to serialize a data class with a property that is a “is-getter” and has continuous capital letters after the “is”. ...
Let’s work on something fun today, simulating a rubik’s cube. This is the precursor to my next topic to provide the solution to solve rubik’s cube. Modell...