Moment For Technology

Design a global exception handler

Recently I had a bit of time off and picked up cicada, an open source project that hadn't been updated for six months. I'm sure you'll have a lot more ideas about this little gadget. That's it, back to business; The most commonly used MVC framework is SpringMVC, and trusting global exception handling is essential when scaffolding is built. Implement a Sp...

Talk about uploading and downloading files

Front-end development is always inevitable about the file upload, download requirements. Here is a summary of common methods, welcome to discuss and ridicule. The most traditional way to upload a file is to upload a file using a form form. Just set encType to multipart/form-data. This way to upload files does not need JS, and there are no compatibility problems, all browsers support, on...

Why override hashCode() when you override equals()

In Effective Java, article 9 states that hashCode() should always be overridden when overriding equals(). Why is that? Let's take a look at these two methods. The Equals () and hashCode() methods in Java are methods in the Object class, and all classes in Java are the Obejct classes...

Java Basic Knowledge summary (reproduced)

Cnblogs.PDF download link: Summary of Java Basics. 1, JDK: Java Development Kit, Java Development and runtime environment, Java Development tools and JRE. Java Runtime Environment (JRE) : Java Runtime Environment (JRE)

Hotfix and plug-in basics - Java and Android virtual machines

Compile Java files into class files using Javac. The ClassLoader loads the class bytecode into the JVM's corresponding memory. The JVM allocates memory to the method area, heap area, stack area, and local mode stack, each of which stores a different part of the bytecode. The garbage collector (GC) manages garbage in the entire memory space. L...

How does JWT do token relay in OpenFeign calls

When Feign is used in Spring Cloud microservice development, the problem of token relay needs to be dealt with. Only token relay can ensure the transmission of user authentication information in the call chain, and realize the implicit transmission of user authentication information in service A to service B through Feign.

Java class loaders: Crap is my thing

Hello, everyone, I am a lot of hair star today's protagonist is "in the daily development, the presence of a very low class loader", as we all know, in addition to the hair is relatively small, but also very low-key, if you want to make friends with big guy, it must first know big guy, the following star to take you to know about the class loader (Ben

Online service CPU 100%, how to do?

Those of you who often do back-end service development have more or less encountered the problem of high CPU load. Especially on weekends or in the middle of the night, suddenly someone in the group feedback online machine load is particularly high, not familiar with the positioning process and ideas of the students may board the server a scramble, positioning process

Java shallow copy and deep copy | Java development practice

Recently, I encountered some problems about collection replication in the development. Ordinary collection replication just makes a quick copy of the stack address in memory, so that a new collection object points to the address block, but the object variable in the collection points to the same block in the heap. So when the copied collection modifies the data in the collection object, the source collection object also changes. This effect is called Java collection versus...

About (Moment For Technology) is a global community with thousands techies from across the global hang out!Passionate technologists, be it gadget freaks, tech enthusiasts, coders, technopreneurs, or CIOs, you would find them all here.