1. Load the velocity expansion package to the project first via Pom.xml:1 Dependency>2 groupId>VelocitygroupId>3 Artifactid>VelocityArtifactid>4 version>1.5version>5 Dependency>2. Then add the following configuration in the XML that automatically loads the bean:1 BeanID= "Velocityconfig"2 class= "Org.springframework.web.servlet.view.velocity.VelocityConfigurer">3 Propertyname= "Resourceloaderpath"value= "/web-inf/views/" />4 Prop
In Java EE application Development, the velocity template files are often packaged together in a jar file, but velocity's default behavior is to read the template file from the OS file system and use Fileresourceloader to read the template file.If you want to get the template file from Classpath instead, adjust the velocity initialization parameters:Velocityengine ve=new velocityengine ();Optional value: "C
Spring MVC version 4.1.6.RELAESE is used in recent projects And Velocity-tools was upgraded to 2.0 by my 2B. ------------------------------ Where the MVC 3 version requires custom Viewclass to complete the velocity tools loading, or error This step, online already someone share out method: ID= "Velocityviewresolver"class= "Org.springframework.web.servlet.view.velocity.VelocityViewResolver"> name= "Viewc
The third application example of velocity-sample code for traversing a set array can be found below
The third application example of velocity -- traversing a set/array
// 2. create a Context objectVelocityContext context = newVelocityContext (); // 3.Add your data objects to this contextcontext. put ("list", Arrays. asList ("first", "second", "third", "fourth"); // 4. choose a templateTemplate template
One. Traverse a map type1. Read the background Java program firstJava codeMapString,string>Paramvalues=New HashMapstring, string>();**** * * the intermediate assignment operation omitted***Data.put ("paramvalues", paramvalues); pass the value to velocity 2. Remove the key and value of this map from the foreground velocity template fileJava code#foreach ($param in ${paramvalues.keyset ()})Tr
Understanding of the continuum hypothesis in macroscopic mechanics:Macroscopic mechanics (such as fluid mechanics, elasto-plastic mechanics, etc.) are the objects of a large number of molecules, at this time each set constitutes a small micro-body, the whole object is made up of the countless small micro-bodies continuously without gaps in the composition. Because we only need to pay attention to the nature of the objects on each set, such as density, veloci
This morning, when I saw livesino's RSS feed, I found this message hidden in "teched 2008 developers: News Summary". Microsoft finally launched their distributed cache (
Distributed in-memory cache) .
Currently, the cache in Asp.net is on the local machine. If each machine in the Web farm needs to maintain its own cache, the most common cacheitem has a copy on each server. this not only wastes memory, but may also cause non-synchronization issues. The distributed cache solves this problem. in a
Objects in 3D space move at a certain speed and sometimes require the object to be oriented in the same direction as the velocity,In order to achieve this goal we generally use the rotation matrix M to rotate the object to the corresponding orientation.For example, the velocity direction vector Spdv:vector3d (The x-axis base vector is Axis_x:vector3d (1,0,0), and the direction of the vector is aligned with
Next to the previous response
When spring MVC integrates velocity, it is necessary to introduce related packages. The packages to be imported are as follows:
Then, it is very simple configuration, then here, modify the content of the springMvc-servlet.xml, the content is modified as follows
Then create the velocity. properties file in the WEB-INF folder, the content is very simple, just a few words
Input
I. Traversing a map type
1. First look at the background Java programJava code
Copy Code code as follows:
Map***
The middle assignment operation omitted the
***
Data.put ("Paramvalues", paramvalues);//pass value to velocity
2. Take out the key and value of this map in the velocity template file of the foregroundJava code
Copy Code code as follows:
#foreach ($par
Org.apache.velocity.tools.generic.DateTool
Jfinal can add Request.setattribute ("date", new Datetool ()) to the interceptor, which you can use at any time in the velocity template of the. vm.
About date, as follows:
function examples Show results
function Examples
Show Results
$date
2008-04-22
$date. Long
April 22, 2008 10:58 P.M. 54 seconds
$date. Medium_time
22:58:54
$da
When it comes to the desktop environment, choosing the right one may be a personal question worth pondering. In this article, I will compare the differences between Gnome and KDE, the most popular Linux desktop environments, we will also explore the functions provided by each desktop environment by comparing their advantages and disadvantages.
First impression
At first glance, you may feel that KDE looks brighter than
Do not miss these ten GNOME Shell extensionsGuideWhen GNOME Shell (namely GNOME 3) first entered the Linux world, many critics pointed out that it lacks flexibility. GNOME, which has made some breakthroughs in appearance, does have some impact on production efficiency. However, it has been quietly handling the question
Install GNOME 14.10 In Ubuntu 3.14
GNOME 3.14 desktop environment has been released, new features and software updates, especially the Wayland (not the default) Display Server can be used to attract everyone. Among them, GNOME 3.14 is equipped with a rewritten Adwaita topic, and new animations are added to the released applications. For detailed changes, see.
Q: I used to enable multiple tags in gnome-terminal on my Ubuntu Desktop. But after upgrading to Ubuntu15.04, I can no longer open a new tag in the gnome-terminal window. How can I enable the tag in gnome-terminal of Ubuntu15.04? In Ubuntu14.10 or earlier versions, gnome-terminal allows you to open a new tag in the ter
Do you like GNOME menus? Install ClassMenuIndicator. For those who have been paying attention to the Ubuntu operating system since the beginning, they have seen almost all the changes in Ubuntu experience. Many changes have taken place, especially on the desktop. Ubuntu has been completely redesigned from the classic GNOME desktop environment to Unity. All new users know is the Unity desktop environment. Th
Nbsp; wait for the system to display the installed components and installable components: # yumgrouplist if the system is installed with minimal installation at the beginning, and xwindow is not installed, install the system first: # yumgroupinstallXWindowSystem install GNOME desktop environment yumgroupinstallgnometrictopenv
Dedicated waiting
Display the components that have been installed in the system and the components that can be installed:# Yu
KDE, GNOME, and XFCE desktop comparisonOver the years, many people have been using KDE or GNOME desktop environments on their Linux desktops. While these two desktop environments have evolved over the years, other desktops have continued to increase their user size. For example, in a lightweight desktop environment, XFCE is one of the most popular desktop environments, and the default configuration of Xfce
According to the Debian Development submission list, Debian 8 will default to use XFCE instead of GNOME, mainly for the following reasons: better accessibility features, especially for visually impaired users; XFCE is closer to the GNOME 2 experience than Gnome 3; Limits on CD capacity
According to the Debian Development submission list, Debian 8 will default to
Spring MVC consolidates the velocity to introduce the packages that need to be imported, such asPom Introduction:Then, is a very simple configuration, then, here, modify the next spring-mvc.xml content, the content is modified as followsXML version= "1.0" encoding= "UTF-8"?>See below the beans this element tag does not have to have the label declaration -Beansxmlns= "Http://www.springframework.org/schema/beans"Xmlns:xsi= "Http://www.w3.org/2001/XMLSch
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.