English Learning Diary 2025-09-21
I got mad yesterday. The kids got angry because their mom didn’t come home. The baby began to walk! The kids began to clean their rooms. Were you listening while I was talking? Tom! Were you eating cake all morning while I was shopping? Where are the kids? Were the babies sleeping while I was at work? No, after you left, they began to dance! Did you cook dinner while I was working? Did you wash the car while I was cooking lunch? Did Mom get angry? Yes, […]
View DetailsEnglish Learning Diary 2025-09-19
Do you need a smaller size? I like the color, But do you have a larger size? These pants are too short. They look likes children’s clothes. The coat he’s wearing is amazing! Excuse me, Can you help us? The ring my friend is wearing is amazing! But it too small, she can’t take off. This is the largest size I can find in the sotre. This bracelet is on sale, it’s two hundred and sixty euros. This is the smallest size at this shop. He usually uses […]
View DetailsEnglish Learning Diary 2025-09-18
I have been to Japan. Remember to turn off the TV before bed. Tell us a story, Grandma! They stayed in Germany for six years. Can you tell us your favorite story? When will you get there? Turn off your computer and go to bed! I have been to China and Japan. I’ll get there at 6 p.m. Which soccer team is the most famous. She takes her medicine before every meal. Can you tell me a story about your life. You should brush your teeth after every […]
View DetailsEnglish Learning Diary 2025-09-17
Did you see this kid on your way home? Did you lose your wallet at the bar? What are your plans for Chrismas Eve? Do you still have double rooms available? If you need a pencil, put your hand up. They stopped at the hospital yesterday. Will you return to this hotel after lunch. Go downstairs, and then turn left. These shor stories are in Japanese. You left your keys in the door. What were you doing all day yesterday? Excuse me, do you mind if we stay […]
View Detailsjsp、freemarker、velocity、thymeleaf页面方案分析
在java领域,表现层技术主要有三种,
(1)jsp;
(2)freemarker;
(3)velocity;
(4)thymeleaf;
English Learning Diary 2025-09-12
If you buy a dress, you’ll get a pair of earrings for free! Look, this shop sells the best swimsuits! If you buy two swimsuits, you can get a pair of earings for free! Do you want to get anything? Do you sell the earrings that this movie star is wearing? That shop has many things that I want to buy. I like the movie star who is wearing the yellow swimsuit! She gave this to me for free, so I didn’t have to pay for it. This […]
View DetailsEnglish Learning Diary 2025-09-11
He paid with Alipay. I paid ten dollars for this scarf. You paid too much for those shoes. Yeah, I want to return them. I paid for these books with Alipay. The scarf you like is sold. The swimsuit that Emma wants is sold. The dress that you like is sold. Emma got her sister a beautiful swimsuit. I had so much fun shopping today! I got the most beautiful skirt! My mom got me an amazing dress. I’m waiting in line now. They waited in line for […]
View DetailsKafka 内存池MemoryPool 设计
GarbageCollectedMemoryPool 是一个非常巧妙的调试工具。它通过继承 SimpleMemoryPool 复用了内存额度控制的逻辑,然后通过重写钩子方法和结合Java的引用机制,增加了一层“内存泄漏”的监控。
正常流程:tryAllocate() -> bufferToBeReturned (登记) -> 使用 -> release() -> bufferToBeReleased (注销) -> ByteBuffer 失去引用 -> 被GC。
泄漏流程:tryAllocate() -> bufferToBeReturned (登记) -> 使用 -> 忘记调用 release() -> ByteBuffer 失去引用 -> 被GC -> BufferReference 进入队列 -> 后台线程检测到,并从 buffersInFlight 中找到了登记信息 -> 报告错误。
Java中Redis的ValueOperations.set后,Key乱码的解决方法
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
@Configuration @EnableCaching public class RedisConfig extends CachingConfigurerSupport { @Bean public RedisTemplate<String,Object> redisTemplate(LettuceConnectionFactory lettuceConnectionFactory){ RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>(); //设置String类型的key设置序列化器 redisTemplate.setKeySerializer(new StringRedisSerializer()); //设置Hash类型的key设置序列化器 redisTemplate.setHashKeySerializer(new StringRedisSerializer()); //设置redis链接Lettuce工厂 redisTemplate.setConnectionFactory(lettuceConnectionFactory); return redisTemplate; } } |
View Details