JAVA entry [4]-IntelliJ IDEA configuration Tomcat,-intellijtomcat1. Create a Maven Module test site
\
2. Configure Application Server
1. File-> Setting: Open the settings panel;
2. Select Application Servers, click +, set the tomcat path, and point to the local Tomcat directory. As shown in:
3. Set Run Configuration
1. Run-> Edit invocations
2. Add DemoStoreWeb1Config in Tomcat Server. The Server pan
-increment The new record ID Value. 7.Mysql using UUID to implement primary keyInsertID= "insertuser"ParameterType= "cn.itcast.mybatis.po.User">SelectkeyResulttype= "java.lang.String"Order= "before"Keyproperty= "id">Select UUID ()Selectkey>INSERT INTO user (ID, username,birthday,sex,address) values (#{ID},#{username},#{birthday},#{s Ex},#{address})Insert>Note that the order used here is "before" using the MySQL UUID () function to generate the primary key, which needs to be modified in the table
One, the codePackage Base.lang;/*** Classname:stateenum* @Description: TODO* @author fuming* @date November 27, 2016*/public enum Stateenum{Add the specified constant for the enumerationOnline (10),Offline (20);You must add a constructor, variable, to get the value of the variableprivate int mstate=0;Private Stateenum (int value){Mstate=value;}/*** @return The actual return value of the enumeration variable*/public int getState (){return mstate;}}Ii. Examples //enumStateenum Orderstate=stateenu
Java.lang.comparableint CompareTo (T other) // use this object to compare to other. Returns a negative value if the object is less than other, or 0 if it is equal; otherwise a positive value is returned. Java.util.Arrays 1.2Static void sort (object[] a) // Use the MergeSort (merge sort) algorithm to sort the elements in array a. Requires that the elements in the array must implement the class of the comparable interface, and that the elements must be comparable between them. Java.lang.Integer 1.
0.So the lock was completely released. The exclusiveownerthread is set to null.Then the waitstatus was changed back to 0. Thread 2 corresponding node will leave the ' waiting queue ' immediately.Thread 3 is awakened.Let state=1, and put the exclusiveownerthread of the lock point to yourself. Represents the thread 3 itself exclusive of this lock.Modify the head pointer, and disconnect the corresponding precursor and subsequent links, so that thread 2 corresponding node leaves the ' waiting queue
Java solution: Java compiler level does not match the version of the installed Java project facet., compilerfacet
Cause: the Java compiler level does not match the Java version setting
Lock as a tool for concurrent shared data, ensuring consistency, there are many implementations in the Java platform (such as synchronized and Reentrantlock, etc.). These locks have been written to provide convenience for our development, but the specific nature and type of the lock are rarely mentioned. This series of articles will analyze common lock names and features in Java to help you answer questions
Java. classpath file Classpath entry org. maven. eclipse. MAVEN2_CLASSPATH_CONTAINER will not be exported or published exception solution, classpathcontainerClasspath entry org. maven. eclipse. MAVEN2_CLASSPATH_CONTAINER will not be exported or published
In actual development of Java Web projects built using Maven, som
Java beginners to proficient-the multi-thread of basic articles to achieve simple PV operation process synchronization, the entry to proficient pv
I. Overview
PV operations are operations on semaphores.
Process Synchronization is a type of constraint between concurrent processes. Execution of a process depends on messages of another process. When a process does not receive messages from anothe
the default value is-1, which means that never times out. If the waiting time is exceeded, the jedisconnectionexception is thrown directly; Private Static intMax_wait = 10000; Private Static intTIMEOUT = 10000; //whether validate operations are performed in advance when a Jedis instance is borrow, and if true, the resulting Jedis instances are available; Private Static BooleanTest_on_borrow =true; Private StaticJedispool Jedispool =NULL; /*** Initializing Redis connection pool*/ Static
Java learning notes (entry) _ multiple select structure switch statements, learning notes switchMultiple choice structure switch statement In java, a switch statement is provided for the multi-path Branch selection process. The switch statement selects one of the multiple operations to run based on the value of an expression. The syntax format is as follows:Copy
Import Java.util.Scanner;public class Stringbuffertext {Main methodpublic static void Main (string[] args) {br/> @SuppressWarnings ("resource")Scanner sc=new Scanner (system.in);Import of String dataSystem.out.println ("Please enter a string:");String Str=sc.nextline ();To a variable of type intint n=0;Convenience arraysfor (int x=0;xAssigns str to a String type S1 object.String S1=str;Replace Java in the string with 1Str=str.replacefirst ("
) Execution process:A: Calculate the value of an expression firstB: Match each case, and if there is one, execute the corresponding statement body and see the break end.C: If there is no match, execute the default statement body n+1.(4) Precautions:A:case can only be constants, cannot be variables, and values after multiple case cannot appear the sameCan B:default be omitted?It can be omitted, but it is not recommended, because it is used to prompt for incorrect conditions.Special cases:Case opt
Java Web entry Testing Program (jsp)
Introduction Test applet for jsp program development
(1) required tools and software java Development Kit jdk
You need to set environment variables. Anyone with Java Development basics can understand this step!
(2) install MyEclipse
VcD4KPHA + o6gzo6mwstewd2Vit/forward + Cjx
[Technical Documentation] Jeecg-P3 development environment to build entry (java Plug-in Development Framework)1. Project Description
Jeecg-p3-web | start main project jeecg-p3-biz-demo | plug-in project Note: The project is maven project, using maven to import eclipse and other IDE development tools standard development tools: eclipse + jdk7 + tomcat7 + mysql
Introduction to Java from getting started to giving up: object-oriented concepts (Entry edition ),
To know what object orientation is, you must first have an object ·
Okay, we are joking. We need to explain what object orientation is.
Example:
"Silly, what did you eat for breakfast today ?"
Silly: "You can eat a lot of food. There are two slices of bread, a chicken pie, a few dishes and leaves, a little s
Day two, data type 1, Java data type 8The purpose of the data type is to temporarily store the raw information between the raw information and the processing information.There are two main classes of Java: A class of basic data types and an object type1 bytes--8 bitsType occupies a range of valuesBYTE 1 byte 2^ (1*8) 256 The minimum value is-128 ( -2^7) The maximum is 127 (2^7-1) default is 0Short 2 byte 2^
first, the error phenomenon.
The Java Project displays red, and a red error is reported in the reference package in the class, and the following error message is displayed below eclipse
Second, the cause of the error.
It is clear from the literal meaning that the Java version is incorrect.
Third, the solution.
3.1 Right-click Project "Properties" on the left side of the "Properties" window tha
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.