Development Java springboot

How to configure the h2 database in Springboot?

H2 is an in-memory or file-based Java SQL database that is often used in Spring Boot applications for testing and development purposes. Configuring H2 database in a Spring Boot application involves the following steps: <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <scope>runtime</scope> </dependency> spring.datasource.driver-class-name=org.h2.Driver spring.datasource.url=jdbc:h2:mem:testdb spring.datasource.username=sa spring.datasource.password= In the above configuration, we are specifying the driver class, database URL, […]

Development Java springboot

How to configure Springboot for HTTPS?

Configuring a Spring Boot application for HTTPS involves the following steps: server.ssl.key-store-type=PKCS12 server.ssl.key-store=classpath:keystore.p12 server.ssl.key-store-password=password server.ssl.key-password=password In this example, we are specifying the keystore type, location, and password for the SSL certificate. server.port=8443 server.ssl.enabled=true server.ssl.key-store-type=PKCS12 server.ssl.key-store=classpath:keystore.p12 server.ssl.key-store-password=password server.ssl.key-password=password In this example, we are specifying the port and SSL properties for the Tomcat web server. @Configuration public […]

Development Technology

Dagger 2

Dagger implements the DI pattern without the burden of writing boilerplate code. Dagger 2 is the first to implement the full stack with generated code. The guiding principle is to generate code that mimics the code that a user might have hand-written to ensure that dependency injection is as simple, traceable and performant as it can be. Declaring […]