1, business log related
If the system is abnormal or the business is abnormal, the first thought is to view the business log
To View the log tool:
Less or more
Grep
tail-f filename to see what's new in real time
PS: Avoid vim directly open large log file, because will be loaded directly into the memory of the
Java application of many bottlenecks in the database, a SQL is not written to cause slow query, may bring the application of fatal harm.
If th
| -enablesystemassertionsEnable System assertion-DSA | -disablesystemassertionsdisabling system assertions-agentlib:Load the native agent library See also-agentlib:jdwp=help and-agentlib:hprof=help-agentpath:Load the native agent library by full path name-javaagent:Load the Java programming language proxy, see java.lang.instrument-splash:Displays the splash screen using the specified imageFor more information, see Http://www.oracle.com/technetwork/
Android, backstage have a unified. We can see that OC is using the Kccoptionpkcs7padding alignment method. In Java, it is clear that pkcs5padding is used. Let's take a look at the alignment choices given in OC, which I'll show directly in the form of code:enum { /**/ kccoptionpkcs7padding 0x0001, Kccoptionecbmode 0x0002 /* */};The two options given in OC are Kccoptionecbmode and kccoptionpkcs7padding. Well, the problem now arise
"PortType" fragment in the WSDL file: [HTML] View plain copy
Description of the following "binding" section: [HTML] View plain copy
The "input" and "output" contents of the two are inconsistent with the name attribute (so-called inconsistency, that is, the former has the name attribute value, the latter does not). After trying, we found that there are two solutions: 1. The name at
'); } }); The datatype parameter is JSONP: JSONP cross-domain request.The JSONP parameter is callback: The callback function is named callback (the same as the background return).The code in the Java background is:/** * Direct output. Handling JSONP returned data */public static void Printjsondata (String text) {PrintWriter Print;try {httpservletrequest Request = Threadcontextholder.gethttprequest (); HttpServletResp
OneCMD View JDK version java-versionCMD view JDK installation path Java-verboseTwoIf the above error occurs, follow these 3 steps to resolve:1. First, close the myeclipse working space.2. Then delete the space under the workspace"/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.genuitec.eclipse.ast.deploy.core.prefs"This file. Some deployment project information is stored in this file. There is no
operating system is similar to the flag bit initially at 1, when the thread enters and first causes the flag bit to be reduced to 0, assuming that the thread is stuck at this point, because the flag bit is 0, the other threads cannot get in. When the thread wakes up, it will flag position 1, allowing other processes to enter) like a toilet on a train: someone (1) no one (0) object is like a lock. A thread holding a lock can execute a thread that does not hold a lock in the synchronization, even
algorithm(1) Algorithm idea: The tagging process is still the same as the "tag-purge" algorithm, but the next step is not to clean up the recyclable objects directly, but to let all surviving objects move toward one end, and then directly clean out the memory outside the end boundary. Icon:4, the generation of algorithms(1) Algorithm idea: Divide the memory into several blocks according to the different life cycle of the object.Java is generally divided into the new generation and the old age,
with Notifyall. ThreadA1 and ThreadA2 both return from Wait (), wait for an object lock on the list object, and attempt to remove the added element from the listing, which can cause trouble and only one of the operations succeeds. Assuming that threadA1 acquires the object lock on the list and deletes the element successfully, when exiting the synchronized block, it frees the object lock on the list, and ThreadA2 acquires the object lock on the list, and continues to delete the elements in the
I am using the Redis is installed on the native virtual machine, the use of Java connection encountered some errors, summed up the need to change the place as follows:1, redis configuration file by default is bound 127.0.0.1 IP, need to find this line in redis.conf, comment out2, Redis default does not allow non-native Client connection, itself is no password, need to set a login password, connect with a passwordSet password command: Config set Requir
In order to avoid repetitive execution of tasks in Java multithreaded execution, shared member variables can be processed through the Synchronized keyword, with the following code: //Multithreading task Method Private voidProcessmultitask (FinalListintThreadCount)throwsException { Process Task List based on number of threads set for(inti = 0; i ) {Taskthread thread=Newtaskthread (list); Thread.Start (); } } //Task Processing threa
What is the difference between ArrayList and vectors? What's the difference between HashMap and Hashtable? What's the difference between StringBuilder and StringBuffer? These are the basic questions that are common in the Java interview. In the face of this problem, the answer is: ArrayList is non-thread-safe, vector is thread-safe, HashMap is non-thread-safe, Hashtable is thread-safe, StringBuilder is non-thread-safe, StringBuffer is thread-safe. Bec
(string[] args) {Sync sync = new Sync (), for (int i = 0; i Operation Result:Test start:Test end:Test start:Test end:Test start:Test end:It can be seen that the synchronized at this time has played a role.So, what do you do if you really want to lock this piece of code? That is, if the first piece of code, each thread new a Sync object, how to make the test method is not multithreaded execution.The solution is also simple, just lock the same object is not OK. For example,lock the same fixed o
java.io.bufferedreader;import java.io.ioexception;import Java.io.inputstreamreader;import Java.net.inet6address;import Java.net.inetaddress;import Java.net.networkinterface;import Java.net.socketexception;import Java.net.unknownhostexception;import Java.util.arraylist;import Java.util.enumeration;import java.util.List; public class Testaddr {/** * get native all IP */private static string[] Getalllocalhostip () { listOf course, we often have a lazy approach, that is to get the
Today, in the form of a code instance, summarize the issues that you should be aware of when you save Java entities to memcached:Memcached Tool Class Code:Package Com.ghj.packageoftool;import Java.util.date;import Com.danga.memcached.memcachedclient;import com.danga.memcached.sockiopool;/** * MemCached Tool class * * @author Gaohuanjie */public class Memcachedutils {private static Me Mcachedclient memcached
double type not "mathematically accurate"?float and double types are primarily designed for scientific calculations and engineering calculations, and they perform binary floating-point operations, which are divided into three parts: The sign bit, the exponent, and the tail part of the computer. When data is stored as binary in the computer, a series of wireless loops appears, and errors occur during data conversion. Decimal cannot accurately represent 1/3, and the same binary cannot accurately
include a WEB-INF/web.xml which will be ignored(webxml attribute is missing from war task, or ignoreWebxml attribute is specified as ‘true‘)The workaround is to add one of the following plugin:
Resources
Automatically deploy Java Web Apps to the Tomcat server using MAVEN
Maven Getting Started example (3): Automatically deployed to external Tomcat
Maven Getting Started example (4): Automatically deploy Tomcat error exclusions
FAQ
thinking, that is, write more, encountered concurrent write high probability, every time to take the data when they think others will be modified, so every time in reading and writing data will be locked, so that others want to read and write this data will block until the lock. The pessimistic lock in Java is the lock in the SYNCHRONIZED,AQS framework is the first attempt to get the CAs optimistic lock to obtain the lock, can not be obtained, will b
(stringescapeutils.escapehtml ( Topic.gettopiccontent ())); Topic.settopictitle (stringescapeutils.escapehtml (Topic.gettopictitle ())); This.bbsTopicService.save (topic); return new Modelandview (New Redirectview ("bbs.do?method=topiclistbfid=" + Topic.getbfid ()));}8.Java Web container default configuration vulnerability. such as Tomcat background Management vulnerability, the default user name and password can be uploaded directly after the war fi
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.