Inlägg

Spring Boot 3 with Scala JS

Bild
 Spring Boot 3 with Scala JS I created a simple Spring Boot 3 webservice which uses Scala JS as a backend dependency and JavaScript for client. This means both backend and client can share logic. See image below    Source Code You can find the code here https://github.com/AIMMOTH/spring-boot-3-scala-js/tree/main

Windows 10 and HP Printer and Scanner

  Running HP Printer with Windows 10 I was trying to run an old HP Deskjet F380 but was not able to scan with Windows 10. I found NAPS2 and it worked out perfectly. You can set the resolution to tune the scanning time. https://www.naps2.com/ 

Spring Boot 3 with Open API

 Spring Boot 3 with Open API  I thought it was hard to find a good example how to implement Open API with Spring Boot 3 and I made a repository at Github with an simple implementation. You find it here https://github.com/AIMMOTH/spring-boot-3 Maven Add the following dependencies and plugin in pom.xml:

Spring Boot 3 with CORS and CSP

 Spring Boot 3 with CORS and CSP Honestly I thought it was very difficult implementing CORS and CSP. But I had done it before with Servlet API and realized you could do the same by using a jakarta.servlet.Filter. You can find the code here  https://github.com/AIMMOTH/spring-boot-3/tree/auth0-cors-csp-security Request  After reading Baeldung's blog it was easy to implement the 2 different filters. For the request I use a component with a high order and checks the request origins:

Spring Boot 3 with Auth0

  Spring Boot 3 with Auth0 Spring Boot 3 is using Spring Security 6 which have some updates. To get Auth0 JWT access token to work I created this simple Github repository. You can find it in this branch https://github.com/AIMMOTH/spring-boot-3/tree/auth0-security Auth0 SecurityFilterChain This repository contains a class with @Configuration and @EnableWebSecurity and matches on request to determine to authorize or permit all. See whole example below:

Spring Boot 3 Implementation

 Spring Boot 3 Implementation Simple implementation with core technology Spring Boot 3 is out and I wanted to implement some core technology as a blue print for future projects.  Spring Boot 3 with... The following technology is implemented and tested in this project: Open API with path and components Controller implementing generated Open API interfaces Maven project Autowired Service Component, for utils WebSocket, configuration and handler Properties, using YAML file JUnit 5 Mockito Lombok Static web files JavaScript for WebRTC client (from Baeldung blog ) Simple HTML form with JavaScript listeners Auth0 4.4 JWT access and Id token CORS CSP Secure WebSocket GitHub Repository You can find my repository at https://www.github.com/AIMMOTH/spring-boot-3 Carl 2023

Color Triangel

Bild
  Color Triangel This weekend I painted a big Color Triangel on an A2 paper. I think it's great fun to paint one because it's easy and soothing. It's also beautiful and a good exercise. This is how I made it Center an equilateral triangle Measure to find the center point  Draw a big circle  Draw a half circle at the bottom  Draw the base line Draw the sides by starting at the top of the big circle and pass by the half circle down to the base line  Colorize , start with light colors Paint white in the center. I used Caran d’Ache water soluble pastels Paint yellow at one side. Add more color at the edge Paint red in the same way as yellow. You will partially cover the yellow Paint blue as before. It will partially cover both red and yellow Paint black close to the sides. It will cover the primary colors Activate the colors with water and a brush I've also added a gray shade around the triangle End with draw black lines . I'm using a color pen which is not water solua