Simple implementation of Socket communication based on Java
J3 - white startTechnology (TCP/IP # UDP # Socket)
Recently opened a project: https://gitee.com/j3_baiqi/communication
Welcome to point out the project structure, coding problems and business direction 😊😊😊😊😊😊.
1, What is a Socket
Encyclopedias:
Vernacular is the interactive interface based on the network communication protocol ( ...
Posted by harsha on Sun, 05 Dec 2021 14:27:06 -0800
Spring - automatic injection?
The way we often inject is similar to this@Service
public class HelloService {
@Autowired
private BeanFactory beanFactory;
@Autowired
public HelloService(ApplicationContext applicationContext) {
}
@Autowired
public void setEnvironment(Environment environment) {
}
}Whether constructor injection or attribute inj ...
Posted by kane007 on Sun, 05 Dec 2021 14:01:29 -0800
SpringBoot project embraces the practice of mybatis plus persistence layer framework
Contents of this article
preface
Since the launch of Mybatis plus, more and more companies have chosen the Mybatis plus framework to replace the persistence layer framework Mybatis in their own projects. Because Mybatis plus not only has the flexibility of handwritten complex sql statements of Mybatis, but also has the general framework met ...
Posted by bob2006 on Sun, 05 Dec 2021 13:54:36 -0800
Application practice of integrating MyBatis with SpringBoot
catalogue
MyBatis environment initialization
summary
Create project module
Add project dependency
Mybatis simple configuration implementation.
Create project startup class
Environment test code implementation
Announcement data layer MyBatis practice
Business description
Pojo class design
Dao interface and method
Implementation and a ...
Posted by tsfountain on Sun, 05 Dec 2021 13:42:58 -0800
Talk about automatic boxing and unboxing in Java
Introduction
The other day, a friend asked me what the following code would do.
public class Main {
public static void main(String[] args) {
Integer i1 = null;
System.out.println(i1 == 1);
}
}
I said I would say NPE (NullPointerException) null pointer exception, although it does report null pointer exception after ex ...
Posted by munky334 on Sun, 05 Dec 2021 13:31:06 -0800
Simple use of ScheduledExecutorService deferred thread pool
1, Timer
There is a Timer class under the java.util package, which is used to implement scheduled tasks
1. Code test
Code implementation steps:
1. Create a timer object
2. Call the schedule polymorphic method of timer object and select the way to execute the task according to the different incoming parameters
The first te ...
Posted by bender on Sun, 05 Dec 2021 13:15:30 -0800
Data structure Java data structure stack and queue and LeetCode related interview questions
1. Stack
1.1 concept
Stack: a special linear table that allows insertion and deletion of elements only at a fixed end. One end for data insertion and deletion is called the top of the stack, and the other end is called the bottom of the stack. The data elements in the stack follow the principle of Last In First Out LIFO (Last In First Out ...
Posted by Mohammad on Sun, 05 Dec 2021 11:30:29 -0800
tomcat entry to mastery
1, Tomcat Foundation
1.1.Tomcat Foundation
Tomcat It's essentially a Servle(Color is) Container, therefore Catalina(Katarina) is Tomcat Core of , Other modules are for Catalina(Katarina) Provide support. such as : adopt Coyote (k The module provides link communication, Jasper(Jasper) Module provision JSP Engine, Naming provide JNDI Servic ...
Posted by lc on Sun, 05 Dec 2021 11:23:07 -0800
Java Concurrency Tool Learning--A Brief Talk about AQS
Preface
The previous blog summarized the contents of CountDownLatch and Cyclic Barrier. The underlying concurrency control of these contents can not be separated from AQS (AbstractQueuedSynchronizer). Personally, there are fewer scenarios in which AQS is directly used to write concurrency tools in your work, and you won't go deep into the ...
Posted by kingsol on Sun, 05 Dec 2021 09:52:15 -0800
Java data structure Day11 -- stack implementation inverse Polish expression (suffix expression) calculator
Today, I happened to talk with some students. Let's share itSimpleDateFormat has thread safety problems. After Java 8, thread safe LocalDate, LocalTime, or LocalDateTime can be used, but to be honest, this LocalDate is much more troublesome than SimpleDateFormat.. but you can write a tool class to encapsulate common methods. So it doesn't seem ...
Posted by NTGr on Sun, 05 Dec 2021 09:10:20 -0800