spring-boot-redis-jedis
Learning Spring boot using JEDIS
Prerequisites
Install Redis Stack Install Redis using Docker Script Install redis-stack on docker docker run -d –name redis-stack -p 6379:6379 -p 8001:8001 -e REDIS_ARGS=”–requirepass root” -v /path/your/local/machine:/data redis/redis-stack:latest
pom.xml
<dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis-reactive</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>io.projectreactor</groupId> […]
# Spring Boot Using Hikari Connection Pool Connection Pool
In software engineering, a connection pool is a cache of database connections maintained so that the connections can be reused when future requests to the database are required. Connection pools are used to enhance the performance of executing commands on a database. Opening and maintaining […]
spring-boot-call-store-procedure
Dynamic calling store procedure and store function in database
Dynamic calling store procedure and function
1. Via Callable Statement
2. Via SimpleJdbcCall spring-boot-starter-jdbc
See Code Snippets
Store Procedure DELIMITER $$ USE `training_sp`$$ DROP PROCEDURE IF EXISTS `create_product`$$ CREATE DEFINER=`root`@`localhost` PROCEDURE `create_product`(id VARCHAR(255), p_code VARCHAR(255),p_name VARCHAR(255),weight BIGINT) BEGIN INSERT INTO product(id, CODE,NAME,weight) VALUES(id,p_code,p_name,weight); […]
Introducing
Changes Is Enemy, But We Must Prepared . –
I have been code with spring boot and thymeleaf, When the *User Interface * add a new search criteria the backend code (my repository, service and controller) must changed too. Honestly I don’t like that. to much changing :(.
I try searching […]
Tesseract is an optical character recognition engine for various operating systems. It is free software, released under the Apache License, Version 2.0, and development has been sponsored by Google since 2006. Tesseract is considered one of the most accurate open source OCR engines currently available Wikipedia
Image processing is widely used in helping to […]
StringUtils is Operations on String that are null safe. Snipset code below was a my code history.
//when i was in collage String result=”putracode”: if(data ==null && data.length>0 ){ result=data; } //First Time in Job String result= (data ==null && data.length>0 ? data ; “putracode”); //And Now String result=StringUtils.defaultIfBlank(data,”putracode”);
Look More Simple.. 😀
StringUtils […]
FastDateFormat is a fast and thread-safe version of SimpleDateFormat.To obtain an instance of FastDateFormat, use one of the static factory methods: getInstance(String, TimeZone, Locale), getDateInstance(int, TimeZone, Locale),getTimeInstance(int, TimeZone, Locale), or getDateTimeInstance(int, int, TimeZone, Locale)
Since FastDateFormat is thread safe, you can use a static member […]
Take a look for RandomStringUtils and RandomUtils. Apache Common-langs make a simple way to do it. RandomUtils is a Utility library that supplement the sandart Random class. RandomStringUtils is an operations for random Strings. Currently private high surrogate characters are ignored. These are Unicode characters that fall between the values 56192 (db80) and 56319 (dbff) […]
SystemUtils help us to know java system properties. We Don’t need get manually. let check this snipset code
And here are the results of our code snippet above:
Do you have a little bored using Java Util Date? Say it to do little operation using java Util Date.
example parsing String to Date, add days , add month, round Date, truncate date
ceiling date and more operation. Using standart java code we will add some code to these operation.
Now I […]