总结
阿里伤透我心,疯狂复习刷题,终于喜提offer 哈哈~好啦,不闲扯了
1、JAVA面试核心知识整理(PDF):包含JVM,JAVA集合,JAVA多线程并发,JAVA基础,Spring原理,微服务,Netty与RPC,网络,日志,Zookeeper,Kafka,RabbitMQ,Hbase,MongoDB,Cassandra,设计模式,负载均衡,数据库,一致性哈希,JAVA算法,数据结构,加密算法,分布式缓存,Hadoop,Spark,Storm,YARN,机器学习,云计算共30个章节。
2、Redis学习笔记及学习思维脑图
3、数据面试必备20题+数据库性能优化的21个最佳实践
后面要用到这个授权码key
导入依赖
<!-- qq邮箱-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
application.yml配置
email业务类
接口
package com.tianju.auth.service;
public interface IEmailService {
/\*\*
\* 发送右键
\* @param to 邮件接收方
\* @param subject 邮件主题
\* @param content 邮件内容
\*/
void sendEmail(String to,String subject,String content);
}
实现
package com.tianju.auth.service.impl;
import com.tianju.auth.service.IEmailService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
@Service
@Slf4j
public class EmailServiceImpl implements IEmailService {
@Value("${spring.mail.username}")
private String from;
@Resource
private JavaMailSender javaMailSender;
@Override
public void sendEmail(String to, String subject, String content) {
SimpleMailMessage mailMessage = new SimpleMailMessage();
mailMessage.setSubject(subject);
mailMessage.setTo(to);
mailMessage.setText(content);
mailMessage.setSentDate(new Date());
mailMessage.setFrom(from);
javaMailSender.send(mailMessage);
log.debug("在{}发送一条邮件{}给{}",mailMessage.getSentDate(),mailMessage.getText(),mailMessage.getTo());
}
}
测试类
package com.tianju.auth.service.impl;
import com.tianju.auth.service.IEmailService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import javax.xml.ws.soap.Addressing;
import java.util.UUID;
import static org.junit.Assert.\*;
@SpringBootTest
@RunWith(SpringJUnit4ClassRunner.class)
public class EmailServiceImplTest {
@Autowired
private IEmailService emailService;
@Test
public void sendEmail() {
emailService.sendEmail("xxxx@qq.com", "我是老王,我在测试代码", UUID.randomUUID().toString());
}
}
springboot整合阿里云短信服务
申请阿里云短信服务
测试短信服务
进行测试
调用结果
成功接收短信
获取阿里云的accessKey
springboot整合阿里云短信
导包
总结
面试前的“练手”还是很重要的,所以开始面试之前一定要准备好啊,不然也是耽搁面试官和自己的时间。
我自己是刷了不少面试题的,所以在面试过程中才能够做到心中有数,基本上会清楚面试过程中会问到哪些知识点,高频题又有哪些,所以刷题是面试前期准备过程中非常重要的一点。
面试题及解析总结
大厂面试场景
知识点总结
15469006553)]
知识点总结
[外链图片转存中…(img-pwBPDWJK-1715469006553)]