Monday, March 27, 2023

ChatGPT in ESLint (I will soon lose my job, replaced by this little bastard...)

Question: 

 

please write a ESLint rule to flag as deprecated the usage of variable names like Button.size.NORMAL

Answer:


To write an ESLint rule to flag the usage of variable names like Button.size.NORMAL, you can use the following code:

vbnet

module.exports = {
  rules: {
    "no-deprecated-variable-name": {
      meta: {
        deprecated: true,
        type: "problem"
      },
      create: function(context) {
        return {
          MemberExpression(node) {
            const { object, property } = node;
            if (object.type === "Identifier" && object.name === "Button" &&
                property.type === "MemberExpression" && property.property.name === "NORMAL") {
              context.report({
                node: property.property,
                message: "The use of 'Button.size.NORMAL' is deprecated. Use a different value instead."
              });
            }
          }
        };
      }
    }
  }
};

This rule creates a new ESLint rule called no-deprecated-variable-name, which checks for the usage of Button.size.NORMAL variables. When the rule encounters this variable, it reports a warning message to the user indicating that the usage of this variable is deprecated and suggests using a different value instead.

To use this rule, you will need to add it to your .eslintrc configuration file:

json

{
  "rules": {
    "no-deprecated-variable-name": "warn"
  }
}

In this configuration, the rule is set to "warn", which means it will produce a warning message but will not fail the build. You can set it to "error" to make it fail the build.




Sunday, March 19, 2023

Reverse Proxy with Docker httpd container on Windows

 https://www.middlewareinventory.com/blog/docker-reverse-proxy-example/

 

I have followed these instructions for Windows and it works, the only change I had to do is to start the container with the  "--net=host" options, and from the container I had to configure the ReverseProxyPass to use the IP address of the host (NOT the WSL IP).



Reverse Proxy with Spring Boot

https://github.com/vernetto/myreverseproxy/blob/master/src/main/java/org/pierre/myreverseproxy/CharonConfiguration.java 

 

I really like the simplicity and power of this CHARON, a Spring Boot- based Swiss knife for load balancing and request forwarding. 

 

Here a lot more examples https://github.com/mkopylec/charon-spring-boot-starter/blob/master/charon-spring-webmvc/src/test/java/com/github/mkopylec/charon/test/ReverseProxyConfiguration.java  



Saturday, March 18, 2023

Reverse Proxy with nodejs

https://github.com/http-party/node-http-proxy
npm install http-proxy --save
node .\server.js

var http = require('http'),
    httpProxy = require('http-proxy');
//
// Create your proxy server and set the target in the options.
//
httpProxy.createProxyServer({target:'http://localhost:10090'}).listen(8000);




Docker container connecting to host service on Windows

docker run -d -p 80:80 --name webserver nginx
docker ps
CONTAINER ID   IMAGE     COMMAND                  CREATED          STATUS          PORTS                NAMES
2733688156aa   nginx     "/docker-entrypoint.…"   14 seconds ago   Up 13 seconds   0.0.0.0:80->80/tcp   webserver


on my windows host I have a Spring Boot application running at port 10090:
netstat -an | grep 10090
  TCP    0.0.0.0:10090          0.0.0.0:0              LISTENING
  TCP    [::]:10090             [::]:0                 LISTENING
  TCP    [::1]:53110            [::1]:10090            TIME_WAIT
  TCP    [::1]:53123            [::1]:10090            TIME_WAIT
  TCP    [::1]:53126            [::1]:10090            TIME_WAIT

and I can also see the nginx container
netstat -an | grep 80
  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING
  TCP    [::]:80                [::]:0                 LISTENING
  TCP    [::1]:80               [::]:0                 LISTENING


If in browser you type "localhost" you should get nginx welcome page (at port 80, default)

Now log into container:
docker exec -it webserver sh

from the container you can connect to
curl host.docker.internal
curl host.docker.internal:10090
they both work, because they "resolve to the internal IP address used by the host"
On my Windows host, if I type "ipconfig" I see that I have
Ethernet adapter vEthernet (WSL): 172.28.176.1
Ethernet adapter Ethernet: 192.168.0.248
If I try:
curl 172.28.176.1:10090
curl 192.168.0.248:10090
they both work on both host and container, but the first is a lot more responsive.
This proves that from container you can access a service running on host.

References:

http://man.hubwiz.com/docset/Docker.docset/Contents/Resources/Documents/docs.docker.com/docker-for-windows/networking.html

NB: besides host.docker.internal , also docker.for.win.localhost can be used, but they have different values (which?)

Saturday, March 11, 2023

Intellij Java remote debug with SSH tunnel

This is the simplest explanation how to do it:
https://arjon.es/2014/remote-debug-of-a-java-app-using-ssh-tunneling-without-opening-server-ports/ (it is a bit confusing, as is uses localhost for both remote and local)
and
https://www.revsys.com/writings/quicktips/ssh-tunnel.html which clearly runs the ssh command locally forwarding to remote and highlights the role of -N parameter)
also worth reading:
https://www.jetbrains.com/help/idea/remote-debugging-via-ssh-tunnel.html#troubleshooting this is about PHP debugging

SSH tunneling explained visually https://www.youtube.com/watch?v=N8f5zv9UUMI

this command does the trick:
ssh -f user@personal-server.com -L 9999:personal-server.com:9999 -N

Chrome Developer Tools devtools

2 interesting crash courses : https://www.youtube.com/watch?v=gTVpBbFWry8
https://www.youtube.com/watch?v=gTVpBbFWry8

Monday, January 9, 2023

Spring DispatcherServlet mappings debugging

clone the project in https://spring.io/guides/gs/actuator-service/ that is https://github.com/spring-guides/gs-actuator-service.git , and start the application in complete folder

add in application.properties:

management.endpoints.web.exposure.include=*
logging.level.org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping: TRACE
logging.level.org.springframework.web: DEBUG

( see https://stackoverflow.com/a/54636087/651288 )

See also https://www.baeldung.com/spring-boot-logging and https://www.baeldung.com/spring-boot-actuator-enable-endpoints This is what I get:

D:\pierre\Java\jdk-17.0.5\bin\java.exe -XX:TieredStopAtLevel=1 -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-javaagent:D:\Program Files\JetBrains\IntelliJ IDEA 2022.2.3\lib\idea_rt.jar=61385:D:\Program Files\JetBrains\IntelliJ IDEA 2022.2.3\bin" -Dfile.encoding=UTF-8 -classpath D:\pierre\github\gs-actuator-service\complete\build\classes\java\main;D:\pierre\github\gs-actuator-service\complete\build\resources\main;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-actuator\3.0.0\bc775ac676465e9da4d191d5b8378e1391fc708c\spring-boot-starter-actuator-3.0.0.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-web\3.0.0\5dd6c38f60b915dce2c4a340f4ea68f2e52306f8\spring-boot-starter-web-3.0.0.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter\3.0.0\18c02ab19529d866723b40c03021cd731c3edb50\spring-boot-starter-3.0.0.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-actuator-autoconfigure\3.0.0\4d437f988e82692b969fdec4a43002d8857e1c01\spring-boot-actuator-autoconfigure-3.0.0.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\io.micrometer\micrometer-core\1.10.2\ca69ca5d4d1fea81ec5f3e05bc159db4e3c87e1\micrometer-core-1.10.2.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\io.micrometer\micrometer-observation\1.10.2\5b63205c0e9f3acf4b84f852ea707f9f9fffda6f\micrometer-observation-1.10.2.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-json\3.0.0\beb1a175ad3cdec82ebd36dd1ddd08a9738a2d86\spring-boot-starter-json-3.0.0.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.springframework\spring-webmvc\6.0.2\cf96960288ba6a95da3488b6d255803c50fa1927\spring-webmvc-6.0.2.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.springframework\spring-web\6.0.2\39dde8bfcc9074af0fcec924ca7465cb90eb25d4\spring-web-6.0.2.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-tomcat\3.0.0\cbaf1a7a69a4a4126896bc397c14b9281634f8e7\spring-boot-starter-tomcat-3.0.0.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-autoconfigure\3.0.0\11c57cfd7a6c6ef2cf16cc91c4d9173f6ab16dd2\spring-boot-autoconfigure-3.0.0.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot\3.0.0\dcf84aaccdb294b8fe53a92b57efecf16708eb2c\spring-boot-3.0.0.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-logging\3.0.0\af37a21b0be9c0c8cd11e3f8a3330b314af639d3\spring-boot-starter-logging-3.0.0.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\jakarta.annotation\jakarta.annotation-api\2.1.1\48b9bda22b091b1f48b13af03fe36db3be6e1ae3\jakarta.annotation-api-2.1.1.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.springframework\spring-core\6.0.2\43f8a6c8b522181d507705aac0e1f1b1e81e7701\spring-core-6.0.2.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.yaml\snakeyaml\1.33\2cd0a87ff7df953f810c344bdf2fe3340b954c69\snakeyaml-1.33.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-actuator\3.0.0\647ddeb370cfc79329663b28edc32e1fbf6ca10f\spring-boot-actuator-3.0.0.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\io.micrometer\micrometer-commons\1.10.2\3a97e1874b8ca9c1c08f67d58bf7d567bb748601\micrometer-commons-1.10.2.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.datatype\jackson-datatype-jsr310\2.14.1\f24e8cb1437e05149b7a3049ebd6700f42e664b1\jackson-datatype-jsr310-2.14.1.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.module\jackson-module-parameter-names\2.14.1\2e05a86dba3d4b05074b6a313c4d5b7ff844c8dd\jackson-module-parameter-names-2.14.1.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.datatype\jackson-datatype-jdk8\2.14.1\da194197d187bf24a8699514344ebf0abd7c342a\jackson-datatype-jdk8-2.14.1.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-databind\2.14.1\268524b9056cae1211b9f1f52560ef19347f4d17\jackson-databind-2.14.1.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.springframework\spring-context\6.0.2\649dc1c9947da39a0d4e3869d61e7270489aaa25\spring-context-6.0.2.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.springframework\spring-aop\6.0.2\fe73295dd65e6b2f53986622c1e622cd3d09aa03\spring-aop-6.0.2.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.springframework\spring-beans\6.0.2\87ded7c3d973ec0bfebe0b6511375ffebe178ae5\spring-beans-6.0.2.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.springframework\spring-expression\6.0.2\89687daffb67231f6be7783775c1f0d46f4541fe\spring-expression-6.0.2.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-websocket\10.1.1\c5a12c16c7ae8dc39f6dad01e486f6c76ef10343\tomcat-embed-websocket-10.1.1.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-core\10.1.1\d3bbf1c2c71a79c5c472090c31e3c28efea5304e\tomcat-embed-core-10.1.1.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-el\10.1.1\a5282bdc29026cacc8e2941b53c78621beed4c7\tomcat-embed-el-10.1.1.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\ch.qos.logback\logback-classic\1.4.5\28e7dc0b208d6c3f15beefd73976e064b4ecfa9b\logback-classic-1.4.5.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-to-slf4j\2.19.0\30f4812e43172ecca5041da2cb6b965cc4777c19\log4j-to-slf4j-2.19.0.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.slf4j\jul-to-slf4j\2.0.4\37418ab81680501a3a1e58e04d1341a5efe1c162\jul-to-slf4j-2.0.4.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.springframework\spring-jcl\6.0.2\5eec2672aab8f80a54ea9047938884813c9eeec8\spring-jcl-6.0.2.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-annotations\2.14.1\2a6ad504d591a7903ffdec76b5b7252819a2d162\jackson-annotations-2.14.1.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-core\2.14.1\7a07bc535ccf0b7f6929c4d0f2ab9b294ef7c4a3\jackson-core-2.14.1.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\ch.qos.logback\logback-core\1.4.5\e9bb2ea70f84401314da4300343b0a246c8954da\logback-core-1.4.5.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.slf4j\slf4j-api\2.0.4\30d5eb5360bd113ce96f9e49e3431993bbf1b247\slf4j-api-2.0.4.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-api\2.19.0\ea1b37f38c327596b216542bc636cfdc0b8036fa\log4j-api-2.19.0.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.hdrhistogram\HdrHistogram\2.1.12\6eb7552156e0d517ae80cc2247be1427c8d90452\HdrHistogram-2.1.12.jar;C:\Users\pierl\.gradle\caches\modules-2\files-2.1\org.latencyutils\LatencyUtils\2.0.3\769c0b82cb2421c8256300e907298a9410a2a3d3\LatencyUtils-2.0.3.jar com.example.actuatorservice.HelloWorldApplication

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v3.0.0)

2023-01-09T14:08:30.732+01:00  INFO 17492 --- [           main] c.e.a.HelloWorldApplication              : Starting HelloWorldApplication using Java 17.0.5 with PID 17492 (D:\pierre\github\gs-actuator-service\complete\build\classes\java\main started by pierl in D:\pierre\github\gs-actuator-service)
2023-01-09T14:08:30.737+01:00  INFO 17492 --- [           main] c.e.a.HelloWorldApplication              : No active profile set, falling back to 1 default profile: "default"
2023-01-09T14:08:32.077+01:00  INFO 17492 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 9000 (http)
2023-01-09T14:08:32.091+01:00  INFO 17492 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2023-01-09T14:08:32.091+01:00  INFO 17492 --- [           main] o.apache.catalina.core.StandardEngine    : Starting Servlet engine: [Apache Tomcat/10.1.1]
2023-01-09T14:08:32.201+01:00  INFO 17492 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2023-01-09T14:08:32.202+01:00  INFO 17492 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1402 ms
2023-01-09T14:08:32.318+01:00 DEBUG 17492 --- [           main] o.s.w.f.ServerHttpObservationFilter      : Filter 'serverHttpObservationFilter' configured for use
2023-01-09T14:08:32.490+01:00 DEBUG 17492 --- [           main] s.w.s.m.m.a.RequestMappingHandlerAdapter : ControllerAdvice beans: 0 @ModelAttribute, 0 @InitBinder, 1 RequestBodyAdvice, 1 ResponseBodyAdvice
2023-01-09T14:08:32.580+01:00 TRACE 17492 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : 
	c.e.a.HelloWorldController:
	{GET [/hello-world]}: sayHello(String)
2023-01-09T14:08:32.583+01:00 TRACE 17492 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : 
	o.s.b.a.w.s.e.BasicErrorController:
	{ [/error]}: error(HttpServletRequest)
	{ [/error], produces [text/html]}: errorHtml(HttpServletRequest,HttpServletResponse)
2023-01-09T14:08:32.586+01:00 DEBUG 17492 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : 3 mappings in 'requestMappingHandlerMapping'
2023-01-09T14:08:32.604+01:00 DEBUG 17492 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Patterns [/webjars/**, /**] in 'resourceHandlerMapping'
2023-01-09T14:08:32.612+01:00 DEBUG 17492 --- [           main] .m.m.a.ExceptionHandlerExceptionResolver : ControllerAdvice beans: 0 @ExceptionHandler, 1 ResponseBodyAdvice
2023-01-09T14:08:32.930+01:00  INFO 17492 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 9000 (http) with context path ''
2023-01-09T14:08:33.007+01:00  INFO 17492 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 9001 (http)
2023-01-09T14:08:33.008+01:00  INFO 17492 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2023-01-09T14:08:33.008+01:00  INFO 17492 --- [           main] o.apache.catalina.core.StandardEngine    : Starting Servlet engine: [Apache Tomcat/10.1.1]
2023-01-09T14:08:33.033+01:00  INFO 17492 --- [           main] o.a.c.c.C.[Tomcat-1].[localhost].[/]     : Initializing Spring embedded WebApplicationContext
2023-01-09T14:08:33.034+01:00  INFO 17492 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 100 ms
2023-01-09T14:08:33.054+01:00  INFO 17492 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 13 endpoint(s) beneath base path '/actuator'
2023-01-09T14:08:33.075+01:00 TRACE 17492 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : 
	o.s.b.a.a.w.s.ManagementErrorEndpoint:
	{ [/error]}: invoke(ServletWebRequest)
2023-01-09T14:08:33.075+01:00 DEBUG 17492 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : 1 mappings in 'requestMappingHandlerMapping'
2023-01-09T14:08:33.080+01:00 DEBUG 17492 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Patterns [/webjars/**, /**] in 'resourceHandlerMapping'
2023-01-09T14:08:33.084+01:00 DEBUG 17492 --- [           main] s.w.s.m.m.a.RequestMappingHandlerAdapter : ControllerAdvice beans: 0 @ModelAttribute, 0 @InitBinder, 1 RequestBodyAdvice, 1 ResponseBodyAdvice
2023-01-09T14:08:33.093+01:00  INFO 17492 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 9001 (http) with context path ''
2023-01-09T14:08:33.108+01:00  INFO 17492 --- [           main] c.e.a.HelloWorldApplication              : Started HelloWorldApplication in 2.927 seconds (process running for 3.697)


http://localhost:9001/actuator/mappings this will give also all your endpoints. See https://docs.spring.io/spring-boot/docs/2.1.11.RELEASE/reference/html/production-ready-endpoints.html for all possoble actuators. And here https://www.baeldung.com/spring-boot-actuators for more coverage on actuators.

When you actually hit an endpoint, like http://localhost:9001/actuator/mappings , this is what you see:

2023-01-09T14:35:33.297+01:00 DEBUG 23248 --- [0.1-9001-exec-1] o.s.web.servlet.DispatcherServlet        : GET "/actuator/mappings", parameters={}
2023-01-09T14:35:33.341+01:00  INFO 23248 --- [0.1-9001-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2023-01-09T14:35:33.342+01:00  INFO 23248 --- [0.1-9001-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2023-01-09T14:35:33.342+01:00 DEBUG 23248 --- [0.1-9001-exec-1] o.s.web.servlet.DispatcherServlet        : Detected StandardServletMultipartResolver
2023-01-09T14:35:33.342+01:00 DEBUG 23248 --- [0.1-9001-exec-1] o.s.web.servlet.DispatcherServlet        : Detected AcceptHeaderLocaleResolver
2023-01-09T14:35:33.342+01:00 DEBUG 23248 --- [0.1-9001-exec-1] o.s.web.servlet.DispatcherServlet        : Detected FixedThemeResolver
2023-01-09T14:35:33.343+01:00 DEBUG 23248 --- [0.1-9001-exec-1] o.s.web.servlet.DispatcherServlet        : Detected org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator@3f1a2baf
2023-01-09T14:35:33.343+01:00 DEBUG 23248 --- [0.1-9001-exec-1] o.s.web.servlet.DispatcherServlet        : Detected org.springframework.web.servlet.support.SessionFlashMapManager@50211373
2023-01-09T14:35:33.343+01:00 DEBUG 23248 --- [0.1-9001-exec-1] o.s.web.servlet.DispatcherServlet        : enableLoggingRequestDetails='false': request parameters and headers will be masked to prevent unsafe logging of potentially sensitive data
2023-01-09T14:35:33.343+01:00  INFO 23248 --- [0.1-9001-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 1 ms
2023-01-09T14:35:33.355+01:00 DEBUG 23248 --- [0.1-9001-exec-1] m.m.a.RequestResponseBodyMethodProcessor : Using 'application/vnd.spring-boot.actuator.v3+json;q=0.8', given [text/html, application/xhtml+xml, image/avif, image/webp, application/xml;q=0.9, */*;q=0.8] and supported [application/vnd.spring-boot.actuator.v3+json, application/vnd.spring-boot.actuator.v2+json, application/json]
2023-01-09T14:35:33.357+01:00 DEBUG 23248 --- [0.1-9001-exec-1] m.m.a.RequestResponseBodyMethodProcessor : Writing [org.springframework.boot.actuate.web.mappings.MappingsEndpoint$ApplicationMappingsDescriptor@69771f5 (truncated)...]
2023-01-09T14:35:33.388+01:00 DEBUG 23248 --- [0.1-9001-exec-1] o.s.web.servlet.DispatcherServlet        : Completed 200 OK

but it's always best to check also Tomcat logs

Sunday, January 8, 2023

React Router explained

https://www.youtube.com/watch?v=Ul3y1LXxzdU best tutorial ever - much better than official documentation https://reactrouter.com/en/main

Wednesday, January 4, 2023