To avoid errors, do not initialize the new repository with README, license, or gitignore files. You can add these files after your project has been pushed to GitHub.
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Spring will create a Proxy class by AOP when detects the Annotated class/method runs, it will:
start the transaction
run the business logic
commit the transaction or rollback
Exception handling
If RunTimeException thrown, the Proxy will roll back the transaction, otherwise(no exception thrown or no-RunTimeException thrown), the Proxy will commit the transaction. But you can also rollback the transaction by rollbackFor property, for example:
A detached entity is a Entity POJO corresponds to a decision table row, but not tracked by the Persistence Context. A managed entity can converted into detached entity by below ways:
A entity POJO that not exist in the Persistent Context store and not managed. A typical example is to create a instance by constructor. To make a transient entity persistent, we need to call Session.save(entity) or Session.saveOrUpdate(entity):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
FootballPlayer neymar = new FootballPlayer(); neymar.setName("Neymar"); session.save(neymar);
@Column(nullable = false, updatable = false) public Long getCreatedAt(){ ... } }
Save Entity
1 2 3 4 5 6 7 8 9 10
public User register(String email, String password, String name){ User user = new User(); user.setEmail(email); user.setPassword(password); user.setName(name); // Don't need to set id.s hibernateTemplate.save(user); System.out.println(user.getId()); return user; }
Introduce how Email is implemented in current Internet and related tech-skills.
Overview
Email Client
When a user wants to send/receive the email to/from a Email, he has to use the Email Cleint to interact with Email Server.
SMTP Server
SMTP is a protocol to transfer Email information. For example, when a Email Client wants to send a Email to the Email Server, or a Email Server(@qq.com, etc.) want to send Email to another Email Server(@163.com, etc.)
IMAP/POP3
SMTP is responsible for sending email while IMAP/POP3 is responsbile for fetching Email. Email Server builds a IMAP/POP3 Server to store emails, then the user can use the Email Client to access IMAP/POP3 Server to fetch Emails.