Тёмный

Spring Data Redis in Spring Boot Example | Tech Primers 

Tech Primers
Подписаться 135 тыс.
Просмотров 109 тыс.
50% 1

Опубликовано:

 

30 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 121   
@rahulvutukuri9254
@rahulvutukuri9254 3 года назад
I apolozise, in the previous comment on redis vedio i asked for java implementation, got it here, good work. Thanks
@MrSuriyam
@MrSuriyam 6 лет назад
thanks for taking the time to explain redis on springboot. Much appreciated.
@shivraj777
@shivraj777 5 лет назад
Good one. This talks about just the Redis as standalone cache. How about making use of Redis along with database like MySQL? so all the CRUD operations will have one more element of adding/updating/deleting the actual data from database based on how Redis performs.
@karishmashaik2842
@karishmashaik2842 3 года назад
Nice explanation . Thank you
@TheNikhil7
@TheNikhil7 3 года назад
Great! Just have a question though, How you made connection to Redis running on some different port, How did Spring came to know about the same?
@MisterViable
@MisterViable 6 лет назад
An example of redis implemented along side of postgresql would be really helpful
@TechPrimers
@TechPrimers 6 лет назад
sure michael, will do that soon
@sofoklisfountas8965
@sofoklisfountas8965 6 лет назад
Great video! A very good example to get a first impressin on Spring, Redis and Rest combined at the right level of difficulty for me. A would like to see a similar example/examples with Spring Cloud Dataflow and Kafka or RabbitMQ.
@TechPrimers
@TechPrimers 6 лет назад
sure. will doo
@tushargoel5522
@tushargoel5522 5 лет назад
Thanks for the video.. I have doubt... You have mentioned that Redis doesn't provide any repository interface.. Why not used CrudRepository?
@mauricepheyton1386
@mauricepheyton1386 4 года назад
Correct me if I’m wrong, did you do the @Postmapping part inside the URL bar? Thanks. 👍
@durgeshkumar9790
@durgeshkumar9790 4 года назад
It's helpful video thanks u so much sir
@rohitmanohar2733
@rohitmanohar2733 4 года назад
very nice explantion, if possible can u provide information , if redis cache server is running on different remote server ,so how to use that ?
@TheWizInterviews
@TheWizInterviews 3 года назад
Thanks for the wonderful video. A crisp and clear introduction to the topic. Just what I needed before starting off on a new project. One suggestion .. can you please crop off a few seconds of the coughing sound in the video. It is a simple task on the RU-vid studio.
@phanimohan9943
@phanimohan9943 5 лет назад
Thanks for this good demo. Helped me to kick start with Redis - Spring Boot
@chandrakishore3143
@chandrakishore3143 5 лет назад
Thanks very nice explanation
@akhilt9577
@akhilt9577 4 года назад
bro, you're awesome. thank you soo much for your efforts. Appreciate it 💙💙💙
@anmolmore6074
@anmolmore6074 5 лет назад
Nice explanation. Just one question, can I create the beans of 'JedisConnectionFactory' and 'RedisTemplate()' in a configuration class file. I mean, if i will create a class called 'JedisConfiguration' and apply '@Configuration' annotation there and declare all my Beans in there ? Will it be a good choice ?
@navneethsubramanya.8465
@navneethsubramanya.8465 4 года назад
Hi Tech Primers, wonderful video, thoroughly enjoyed it. i have a question though, this is using spring data redis to store in memory database, but what if i want to use JPA along with this? such that when a request is made it should first search in the redis cache, if not found then hit the persistence ?
@rituagrawal2218
@rituagrawal2218 6 лет назад
Awesome video. Crisp and to the point
@Dizzy_Dizz
@Dizzy_Dizz 3 года назад
Good indeed, Can you have a tutorial for microservcie session handling? perhaps using redis
@mitali_bhokare
@mitali_bhokare 4 года назад
Is there an example explaining Redis using the Lettuce client?
@mansisaraswat857
@mansisaraswat857 2 года назад
Great video..
@1414Akash
@1414Akash 3 года назад
For every repository we need to create RedisTemplate? Like in your case you had only user repository so you created RedisTemplate
@hasanenesdogan1243
@hasanenesdogan1243 4 года назад
Thank you so much for this tutorial it was very helpful. Can you do a tutorial about user registration with redis?
@amarreddy09
@amarreddy09 6 лет назад
Can u post video on authentication & Authorization with redis for multiple services. Thanks
@benjamingreen1278
@benjamingreen1278 3 года назад
Hi, is redis necesarily used with jpa? because the way data is stored/retrieved/deleted/updated seems alike as jpa. is it possible to use redis with other data action type(such as mybatis. jpa will be faster, so the choice will be jpa, but I wonder why redis is always used with jpa)?
@psterdale
@psterdale 4 года назад
Good comprehensive tutorial... Thank you...
@ajaydhiman2368
@ajaydhiman2368 3 года назад
I notice you didn't use @Autowired in Controller and in Impl class but still this example run - how ?
@matianze7090
@matianze7090 3 года назад
Thanks.
@rahulvutukuri9254
@rahulvutukuri9254 3 года назад
could help to explain an example of a transaction in a distributed system using distributed Redis, ex: cart created, item added and when we add 2nd item we do not know, which replica of APP handle the 2nd scan and how can distributed cache help us
@anisam123
@anisam123 4 года назад
what is the difference between doing the crud operations in this way and doing crud operation using normal spring data jpa where model objects are annotated with RedisHash?
@codefarm0
@codefarm0 4 года назад
Very well explained. Thanks :)
@motikumar4511
@motikumar4511 6 лет назад
Awesome video for beginners
@fareezjasmi6893
@fareezjasmi6893 5 лет назад
Thankyou for the very insightful tutorial !
@amrendrasingh8641
@amrendrasingh8641 6 лет назад
Hi Ajay, Thanks for Great Video. How can I use redis as a distributed cache?
@jnsridhar
@jnsridhar 3 года назад
how to inject redisTemplate by only using the application.properties ??
@sagarsinha30
@sagarsinha30 3 года назад
How to do a mass insertion in redis , I have a databse in MySql and i want it to add it to Redis Sever. Any method to do it so?
@indiautube4915
@indiautube4915 5 лет назад
Thanks for the Tutorial. Suppose we have a portal with Shopping Cart. Guest users, without login, can add products to their Shopping Cart. If we save the user's shopping cart to Redis, how to differentiate which Cart belongs to which user. Is there a way this can be done with JSESSIONID or something similar?
@sudhanshugupta2511
@sudhanshugupta2511 5 лет назад
Can we connect to the aws elastic cache (redis) locally ?
@seemamehra786
@seemamehra786 4 года назад
Here you have stored data directly to redis what if we want to add to data to oracle db with that maintain cache in redis
@muhammadahmedshaikh9531
@muhammadahmedshaikh9531 3 года назад
How can i use hateoas and HAL in this project
@loftkey
@loftkey 3 года назад
Why use opsforhash over opsforvalue?
@joepoor5327
@joepoor5327 4 года назад
ty
@abdulsattarshaikh9758
@abdulsattarshaikh9758 5 лет назад
nice and very helpful video
@prasaddharmadhikari1126
@prasaddharmadhikari1126 4 года назад
Please make a video on spring boot with jwt authentication using redis
@夏凡-i9t
@夏凡-i9t 6 лет назад
Can I lock the key? Like when I am query or handle some certain key's value, this key can not be reached by another operation. So basically can i add a lock on the key but not the whole redis process. If can how do you do it then?
@bhargavasurimenu7850
@bhargavasurimenu7850 5 лет назад
Did I miss the Redis Configuraiton in Spring boot Application ?, I saw you created JedisConnectionFactory and assigned to RedisTemplate.
@ruchitajain4165
@ruchitajain4165 6 лет назад
@Ajay very informative video. I have got one doubt from where the data is coming i.e. from where are you reading the Name, Id ("1, Peter" , "2, Ryan") and storing it further in Redis. i ts kind of a silly question but if you can guide me here. TIA
@TechPrimers
@TechPrimers 6 лет назад
hi ruchita, the values are created via REST endpoints (/rest/user/update)
@suryakantamahanty9990
@suryakantamahanty9990 6 лет назад
can you tell how to see these inserted values in redis command line interface ??
@TheKNdheeraj0
@TheKNdheeraj0 6 лет назад
Use keys * command to know all the keys in the redis and the key would look weird, because generally Jedis makes the key of hash type so copy that key and type HGETALL it will display all the java objects of hash type
@vaib5917
@vaib5917 6 лет назад
Can you please make a video on Redis Pub-Sub using Spring Boot? Thanks in advance
@vijaymanivannane1689
@vijaymanivannane1689 5 лет назад
Thanks, It was lot Helpful. I am thinking about connecting springboot to AWS Elasticache Redis. Will this implementation work if I provide hostname and port number ?
@TechPrimers
@TechPrimers 5 лет назад
Yes
@souvikdas226
@souvikdas226 4 года назад
i am able to post data using the code , but while fetching all values from redis using the key "USER" its not showing any data , but get "rest/user/all" is working fine .. any idea ? 127.0.0.1:6379> KEYS * 1) "\xac\xed\x00\x05t\x00\x04USER" 127.0.0.1:6379> HGETALL USER (empty array)
@BigBigLeo
@BigBigLeo 4 года назад
thanks for your job, bro)
@aleksei4604
@aleksei4604 4 года назад
Thanks. Exect this is nessary for interview.
@rudrascorpio
@rudrascorpio 6 лет назад
How do i set expiry / or time to live for User objects while saving ?
@panduseru6107
@panduseru6107 7 лет назад
you have any example how to store jwt token into Redis cache
@pratikool1
@pratikool1 4 года назад
Please add videos for redis sentinel mode with lettuce client
@PraveenKumar-lp6il
@PraveenKumar-lp6il 5 лет назад
thank you... it is working fine. i did it..
@praneethsai27
@praneethsai27 4 года назад
Thanks it was quite helpful.Is there a way i could use findByIdAndnameNot in Springdata redis?
@seixao
@seixao 4 года назад
great question!
@balrajmys
@balrajmys 7 лет назад
Awesome bro :) I really liked this video.. Very Informative.. Thanks :)
@smithalder2778
@smithalder2778 4 года назад
Thank you for the tutorial but if i want to do a post call how to do that
@sumitkapoor1206
@sumitkapoor1206 6 лет назад
why did'nt you use @cacheable?
@MadMax-lw7er
@MadMax-lw7er 5 лет назад
very helpful tutorial
@dheerajscorefitness6981
@dheerajscorefitness6981 3 года назад
How did it connect to reddis, you have not provided any connection in application.properties to your local reddis, can someone please explain this, how the connection happened to reddis, we generally provide connection in case of MySQL through application.properties but in this case it didn't happen, please help.
@lagvales
@lagvales 6 лет назад
You helped me a lot!
@amarreddy09
@amarreddy09 6 лет назад
How to store data from zuul filter to redis. Thanks
@lh6845
@lh6845 4 года назад
How to set TTL here?
@jasongufeng
@jasongufeng 6 лет назад
Great video!
@java3711
@java3711 5 лет назад
could you please show us.How to deploy this example on PCF cloud
@TechPrimers
@TechPrimers 5 лет назад
you can check other videos on PCF. I have done them.
@dileepalla6769
@dileepalla6769 7 лет назад
Can u Post an example on junit how to write junit test case for controller
@TechPrimers
@TechPrimers 7 лет назад
video coming in few minutes
@NarendraPrasanth
@NarendraPrasanth 5 лет назад
How to see the results in redis server
@nitinsridhar7555
@nitinsridhar7555 5 лет назад
Awesome Dude
@nitinsridhar7555
@nitinsridhar7555 5 лет назад
2018-12-29 13:55:39.459 INFO 4652 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode! 2018-12-29 13:55:39.591 INFO 4652 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode! 2018-12-29 13:55:39.621 INFO 4652 --- [ restartedMain] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.repository.ArticleRepository. 2018-12-29 13:55:39.625 INFO 4652 --- [ restartedMain] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.repository.CategoryRepository. 2018-12-29 13:55:39.626 INFO 4652 --- [ restartedMain] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.repository.UserAddressRepository. 2018-12-29 13:55:39.627 INFO 4652 --- [ restartedMain] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.repository.UserRepository.
@nitinsridhar7555
@nitinsridhar7555 5 лет назад
As I mentioned Please guide me how to resolve this
@AmongManyWays
@AmongManyWays 6 лет назад
Why did not we autowired the redisTemplate in Repository ?
@sridharreddy5415
@sridharreddy5415 5 лет назад
Hi, I implemented Spring redis and REDIS server I am running docker image, and port is mapped to local port. docker run -p 6379:6379 redis but when I run the application, I am getting the following error 2019-01-28 18:58:22.285 ERROR 49588 --- [nio-8081-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.data.redis.RedisConnectionFailureException: Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool] with root cause
@huanglu1691
@huanglu1691 7 лет назад
Thank you so much for sharing. It is great!
@TechPrimers
@TechPrimers 7 лет назад
My pleasure Jakson. Glad that was useful
@huanglu1691
@huanglu1691 7 лет назад
It does. Thank you.
@Po4kaKita
@Po4kaKita 4 года назад
Thx!
@dnr2361
@dnr2361 5 лет назад
Hi bro can u tell me how to invalidate the session.... In redis...
@BANKNIFTYTRADERR
@BANKNIFTYTRADERR 4 года назад
Hello one more examples with MySQL database using with redis how to implement MySQL and hibernate...
@orenazuz
@orenazuz 6 лет назад
a very good tutorial I was wondering how to implement redis with mongodb if you have any idea it will be great thanks
@surendirababujanarthanan761
@surendirababujanarthanan761 7 лет назад
Can we configure the cache size and the cache time limit to invalidate the cache without restarting the redis server similar to how we configure using ehcache provider?
@TechPrimers
@TechPrimers 7 лет назад
Yes, you can do both without restarting the Redis server
@arvindgupta-zm7lz
@arvindgupta-zm7lz 4 года назад
please make videos on spring boot
@PrakashKumar-wv9yi
@PrakashKumar-wv9yi 5 лет назад
Is it same for redis search also ?
@TechPrimers
@TechPrimers 5 лет назад
what is same? I did not get your question prakash
@ratjagapakhi1
@ratjagapakhi1 5 лет назад
Dont we need to start redish server separately or it is embedded ?
@TechPrimers
@TechPrimers 5 лет назад
It's separate
@bathulanagendra4621
@bathulanagendra4621 6 лет назад
Hi Peter, i am getting the output like {"2":{"id":"2","name":"surya","salary":20000},"1":{"id":"1","name":"nagendra","salary":20000}}. where im doing mistake.Suggest me to get output like your example.
@meenakshisundaram3231
@meenakshisundaram3231 4 года назад
What's wrong here. Is it the order of elements?
@gobinathjeganathan7902
@gobinathjeganathan7902 7 лет назад
Super video bro😀...
@TechPrimers
@TechPrimers 7 лет назад
my pleasure gobi
@gobinathjeganathan7902
@gobinathjeganathan7902 7 лет назад
Tech Primers can we use redis as a normal database
@TechPrimers
@TechPrimers 7 лет назад
+gobi nath yes you can. But you wont have great SQL client lile tools for querying redis
@gobinathjeganathan7902
@gobinathjeganathan7902 7 лет назад
Tech Primers ok... Thank you very much
@overview1662
@overview1662 6 лет назад
Hi Team, Can you please share sample code of how to use using Mysql and Redis as a secondary cache integration with HashOps using Spring Boot? It will be helpful for many students.
@overview1662
@overview1662 5 лет назад
I have done the same, check the below code: public Article findArtilcleById(String articleId) throws IOException { Optional id = Optional.of((Long) (Long.valueOf(String.valueOf(articleId)))); try{ //To check if data is in cache or not if(!hashOperations.hasKey(key, articleId)) { logger.info("Yes Data is not in the cache, add it in the cache now."); //Getting data from database Article a = articleRepository.findById(id); //Storing data from database to cache hashOperations.put(key, String.valueOf(a.getId()), a); return a; } }catch (Exception e){ System.out.println(" "+e.getMessage()); } // Returning data from cahce if data is in the cache. Article article = gson.fromJson(String.valueOf(hashOperations.get(key, articleId)), Article.class); logger.info(("Getting it from cache")); return article; }
@proxy5061
@proxy5061 2 года назад
Simple annotations are dere , easy
@karankanojiya7672
@karankanojiya7672 3 года назад
Respect ++ !
@shubhambisht3090
@shubhambisht3090 4 года назад
hi getting this exception Caused by: java.lang.ClassNotFoundException: redis.clients.jedis.JedisPoolConfig
@pan1490
@pan1490 5 лет назад
Can anyone have any information on redis pipeline in spring boot?
@ray5843
@ray5843 6 лет назад
Spring Data Redis in Spring Boot Example | Tech Primers
@naregbar190
@naregbar190 5 лет назад
Why didn't you use @RedisHash ?
@TechPrimers
@TechPrimers 5 лет назад
@RedisHash was introduced post Spring data redis 1.7
@mr_shamanth_m
@mr_shamanth_m 5 лет назад
Hi, i am really liking your Tech Videos, thanks a lot for the videos :) could you help me with Distributed Cache please, i am not getting references for this. One server with multiple clients accessing same cache, clients may be on same server or different server.
@fairozahmed7113
@fairozahmed7113 7 лет назад
Cool
@zokalyx
@zokalyx 3 года назад
"sping" boot in thumbnail
@techperson2312
@techperson2312 5 лет назад
for beginners its really hard to understand
@akhileshguptaakhi
@akhileshguptaakhi 4 года назад
Connecting with host and password: @Bean JedisConnectionFactory jedisConnectionFactory() { RedisStandaloneConfiguration redisStandaloneConfiguration = new RedisStandaloneConfiguration("192.168.1.51", 6379); redisStandaloneConfiguration.setPassword(RedisPassword.of("yourRedisPasswordIfAny")); return new JedisConnectionFactory(redisStandaloneConfiguration); }
@proxy5061
@proxy5061 2 года назад
bro hy , redis wtf
@R.fit_b
@R.fit_b 4 года назад
jedis pool config is required how to manage it?
Далее
🤍ПОЮ для ВАС ВЖИВУЮ🖤
3:04:40
Просмотров 1,3 млн
Next Level Redis with Spring
29:51
Просмотров 17 тыс.
Spring Security using OAuth2 in Spring Boot | Tech Primers
1:00:37
Actuators in Spring Boot | Tech Primers
17:17
Просмотров 49 тыс.
Spring Tips: Redis
1:07:41
Просмотров 20 тыс.