Article Tags
Home Technical Articles Backend Development
What is the SpringBoot startup principle?

What is the SpringBoot startup principle?

Entry version: 2.1.8.RELEASE Startup code: @SpringBootApplcationpublicstaticvoidmain(String[]args){SpringApplication.run(BlogAdminApplication.class,args);System.out.println("========adminstartsuccess... ==========");} Two parameters are passed in here, the current class of BlogAdminApplication and the args parameter we click

May 10, 2023 pm 06:10 PM
SpringBoot
How to deal with the java underlying JDK Logging module

How to deal with the java underlying JDK Logging module

Starting from the example, the use of JDKLogging is very simple. As shown in the following code, you can first use the static method getLogger of the Logger class to obtain a logger, and then you can use the obtained logger for log input anywhere. For example, calls like logger.info("Mainrunning."). packagecom.bes.logging;importjava.util.logging.Level;importjava.util.logging.Logger;publicclassLoggerTest{pr

May 10, 2023 pm 02:55 PM
Java jdk logging
How to package a Java or Java Web project into a JAR package or WAR package

How to package a Java or Java Web project into a JAR package or WAR package

1. Why Packaging There are different opinions on this issue on the Internet. Based on personal understanding and online opinions, it is packaged as a jar package for the convenience of others. If you are running a java program, you do not need to look for the class containing the main method to execute; if you are using a third-party jar package, import the jar package directly into your own project instead of copying a bunch of class files. Building a war package is the web application deployment method chosen in real production environments. It is said online that this method will not cause file loss like directly copying folders, and the server will optimize the application, such as deleting empty folders, etc. The above is for information only. 2. How to package the local environment windows10, jdk1.8 into jar or war package using the same tool jdk

May 07, 2023 am 10:25 AM
Java jar war
How to use Dockerfile to create an image of the java running environment

How to use Dockerfile to create an image of the java running environment

The environment currently used is: centos7.5docker-ce18.06.1-ce1. First use the basic image of centos7.5.1804 to install some environments required for operation and create the corresponding file directory in the /app directory [root@node2/app /]#mkdirdockerfile/{web/{nginx,tomcat,jdk,apache},system/{centos,ubuntu,redhat}}-pv[root@node2/app]#cddockerfile/system/centos/[root@node2/app /do

May 05, 2023 pm 01:49 PM
Java dockerfile
How to specify JDK path in JAVA

How to specify JDK path in JAVA

By default, Tomcat will use the system's environment variables to find JAVA_HOME and JRE_HOME. But sometimes we need different versions of JDK to coexist. JAVA_HOME and JRE_HOME can be set at the front of ${TOMCAT_HOME}/bin/catalina.bat. For example: 1

May 05, 2023 am 11:19 AM
Java jdk
How to use Java's finalize() method

How to use Java's finalize() method

Alternative usage of finalize() in Java. Anyone who has done JAVA programming knows that there is a garbage collector mechanism in JAVA. When it runs (usually automatically runs when the system memory reaches a certain limit), it will recycle no longer The memory occupied by the object used, so in JAVA programs, we usually only consider creating objects and never care about the clearing of objects. Finalize() is a special method provided by JAVA for classes. The working process of the garbage collector is roughly like this: Once the garbage collector is ready to release the storage space occupied by useless objects, it first calls the finalize() method of those objects, and then actually reclaims the object's memory. By using finalize(), you can

Apr 30, 2023 pm 02:43 PM
Java finalize()
How to configure java environment and install tomcat in Centos

How to configure java environment and install tomcat in Centos

1. Install the java environment: Visit the orcal official website to download the jdkrpm package: After the download is complete, execute: rpm-ivhjdk-8u161-linux-x64.rpm to install. By default, it will be installed in the /usr/java directory. After the installation is completed, modify /etc/ profile file, add the java environment variable: exportjava_home=/usr/java/jdk1.8.0_161/exportclasspath=.:$java_home/jre/lib/rt.jar:$java_home/lib/dt.jar:$java_home/lib/tools

Apr 30, 2023 am 11:07 AM
Java CentOS tomcat
What are the common WEB servers in Java?

What are the common WEB servers in Java?

A web server is a container that runs and publishes web applications. Only when the developed web project is placed in the container can all users on the network access it through a browser. The servers used to develop JavaWeb applications are mainly Web servers compatible with JSP/Servlet. The more commonly used ones are Tomcat, Resin, JBoss, WebSphere and WebLogic, etc., which will be introduced separately below. Tomcat server The most popular Tomcat server at present is a sub-project of the Apache-Jarkarta open source project. It is a small, lightweight Web server that supports JSP and Servlet technology, and is also suitable for beginners.

Apr 30, 2023 am 11:01 AM
web Java
How to install tomcat and deploy Java web projects on CentOS

How to install tomcat and deploy Java web projects on CentOS

1. Preparation a. Download the tomcatlinux package, address: , the version we downloaded is 8.0, the download method is as shown in the figure: b. Because the installation of tomcat depends on javajdk, we need to determine whether jdkb.1 is installed under the linux system. (xshell) Connect to the Linux system and enter the command in b.2 below: java-version. If the jdk version number is displayed, it proves that it has been installed. If it is not displayed, it proves that it is not installed. If it is not installed, please refer to the following address to install it: / /www.jb51.net/os/redhat/73016.html, as shown in the figure: c. The software and systems required for operation are as follows

Apr 29, 2023 pm 11:01 PM
Java CentOS tomcat
How to add java startup command to tomcat service

How to add java startup command to tomcat service

Existing code: 1. Main function: maingame.java (the function that starts the game.) 2. Frame running class: gameenterframe.java (responsible for loop execution. I set it to run every 2 seconds to write data to the database. .) Regarding self-starting, there are two key points: 1. You need to modify a configuration file named web.xml in web-inf under webroot. If you don't have the same path as my picture, unfortunately, it means you created the wrong project type. Remember to create a new webserverproject. Simply add three lines of code to this file to tell tomcat that I want to run a self-starting class. I named it auto.

Apr 28, 2023 pm 12:34 PM
Java tomcat
How to use both SSL and non-SSL connections in Java Mail?

How to use both SSL and non-SSL connections in Java Mail?

Recently, I encountered a problem while doing javamailssl: using JavaMail to receive emails cannot be successful after the system has been running for a certain period of time. The error message is as follows: javax.mail.MessagingException:Connectfailed;nestedexceptionis:javax.net.ssl.SSLHandshakeException:sun.security .validator.ValidatorException:PKIXpathbuildingfailed:sun.security.provider.cert

Apr 27, 2023 pm 02:31 PM
Java mail
How to install tomcat and deploy Java web projects on CentOS

How to install tomcat and deploy Java web projects on CentOS

1. Preparation a. Download the tomcatlinux package, address: , the version we downloaded is 8.0, the download method is as shown in the figure: b. Because the installation of tomcat depends on javajdk, we need to determine whether jdkb.1 is installed under the linux system. (xshell) Connect to the Linux system and enter the command in b.2 below: java-version. If the jdk version number is displayed, it proves that it has been installed. If it is not displayed, it proves that it is not installed. If it is not installed, please refer to the following address to install it: / /www.jb51.net/os/redhat/73016.html, as shown in the figure: c. The software and systems required for operation are as follows

Apr 26, 2023 pm 02:22 PM
Java CentOS tomcat
How to manually configure Servlet to run in Tomcat in Java?

How to manually configure Servlet to run in Tomcat in Java?

1. The preparation work is as shown below. First create each file as required. If you think it can run, you are wrong (I was stuck here at the beginning). The project structure of idea. If you have learned to use idea to create servlet applications, you must You will find that the web.xml provided here is not complete at all. Please use the following code to include the above-mentioned servlet tag //Add the above-mentioned servlet tag code here 2. The problem with encoding the compiled file is as above. I wanted to compile it at first, but an error was reported. The reason here is that javac will read the source file code according to your operating system encoding, and my computer defaults to GBK, but we all write these source codes in Notepad, and Notepad uses UTF-8 by default. save at

Apr 26, 2023 am 09:55 AM
Java tomcat servlet
How to set up a Java Web project running environment on a Linux system?

How to set up a Java Web project running environment on a Linux system?

1. Install jdk1. Uninstall the old version or the jdk that comes with the system (1) List all installed jdk | rpm-qa | grepjdk (2) Uninstall unnecessary jdk | yum-yremove installation package name 2. Download and unzip the jdk ( 1) Download the installation package and enter the /usr/local directory to create a new java directory mkdirjava. Use the wget command in the java directory to download the installation package, such as wget--no-cookies--no-check-certificate--header"cookie:gpw_e24 =http%3a%2f%2fwww.o

Apr 26, 2023 am 08:07 AM
web Linux Java
How to use Maven tools and Tomcat in Javaweb

How to use Maven tools and Tomcat in Javaweb

1. Maven tool 1, about mavenMaven is a project construction tool. As long as the created project follows the Maven specification (called a Maven project), it can be managed using Maven: compilation, packaging, etc. 2. Install maven. If you have already configured the JDK when installing idea, then you do not need to install maven. Idea already comes with maven. If the JDK is not installed and configured, the specific download and configuration process is relatively simple and will not be described here. 3. Using maven4, understand that pom.xmlpom.xml is the core configuration file in the maven project, and xml is a file format. This format is also a tagged language, similar to

Apr 25, 2023 am 09:58 AM
web Java maven

Hot tools Tags

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

vc9-vc14 (32+64 bit) runtime library collection (link below)

vc9-vc14 (32+64 bit) runtime library collection (link below)

Download the collection of runtime libraries required for phpStudy installation

VC9 32-bit

VC9 32-bit

VC9 32-bit phpstudy integrated installation environment runtime library

PHP programmer toolbox full version

PHP programmer toolbox full version

Programmer Toolbox v1.0 PHP Integrated Environment

VC11 32-bit

VC11 32-bit

VC11 32-bit phpstudy integrated installation environment runtime library

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use