Entradas

Mostrando entradas de julio, 2023

SpringBoot (10) Authentication (1). Server certificate, application.yml and Application.java

 0. Introduction The goal is to use a certificate for client authentication. So the HTTPS protocol should be used.  To use this protocol, a server certificate is needed. Let's see the steps to accomplish this target: 1. Server certificate Get a server certificate in "p12" format with a password.  Create a folder ( keystores ) in src/main/resources and place the server certificate in this folder. 2. application.yml file Here is the file ====================================================================== server : #==================================================================================== # 1. For accepting "{ }" in parameters and for accepting a long number of parameters #==================================================================================== #@see https://stackoverflow.com/a/58440058/7704658 #@see https://www.programmersought.com/article/4517808578/ tomcat : relaxed-query-chars : [ ' { ' , ' } '

SpringBoot (9) Using AG-Grid

SpringBoot (8) Defining the Base.java interface

 0. Introduction Base interface is the interface that has either default methods and has the interface of the methods to be implemented in any class Implementing this interface. In addition of forcing to define fields as id and description (by means of its getters and setters), there are some methods that are used with Spring Boot applications. 1. Methods 1.1. Getting initial values: void getInitializedBase(Map<String, Object> mpObjects)( interface ): Assigns the attributes of the class the values of the map "mpObjects" in a NEW instance void addDefaultFormValors(Map<String, Object> mpObjects) )( interface ) : Add additional info that may be used in the form, for instance new empty children 1.2. Validation: public default int validate(Locale locale) {return 0;} for validating a bean. It should be overridden by the specific bean. Sometimes if the bean is included in another bean's collection, the bigger bean can validate data form choldren and there is no nee