Original post address: http://blog.csdn.net/wzl002/article/details/5969469This time, I started a web project from scratch and found that there are not many instructions on Spring 3.0 on the Internet. So I would like to take this opportunity to record the process of configuring a basic web project, mainly spring 3, in fact, most of them are similar to 2.
Step 1: Create and deploy a WEB Project (skip)1. Here I would like to briefly describe the WEB Project. In fact, the most basic of a wen project
gives a recommendation to ensure that the installation can be determined. As you can see, the results of the tests below are not all Passed (passed), and some show warning (warning). Of course, your configuration may be slightly different, so your display results will vary. In fact, the following details are not necessary to pass all. But part is also necessary, according to conclusion (conclusion) of the content of this paragraph: your server configuration satisfies the minimum requirements of
A small module case of the JPA project, a JPA project module case
Recently, I was working on a Web project. I found a small module to take notes and sorted it out a little. Well, I entered the question.
The code for the entire project is here: http://download.csdn.net/detail/leopard100/7712375
The framework used in the entire project is roughly as follows: backend> Struts + Spring + JPA;
Foreground> jgGrid
Database> Oracle
The following is the background function logic of the entire project:
T
files in the package are included when the Web page is rendered.
Defining Resource Bundles
The resource bundle is specified as a PHP class that inherits Yii\web\assetbundle, the package name is a PHP class name that can be loaded automatically, and in the resource bundle class, you specify the location of the resource, which CSS and JavaScript files are included, and the dependencies that are related to the other packages.
The following code defines the primary resource bundle used by the under
If we open more than one file at a timeLook at the files in the current directory:[Email protected]/data/webroot/testroot/application/modules/admin/Views $ lltotal -drwxr-xr-x2Wangkongming wangkongming4096July - -: the. DRWXR-xr-x4Wangkongming wangkongming4096JuneTen -: - ..-rw-r--r--1Wangkongming wangkongming515July - -: Aadd.html-rw-r--r--1Wangkongming wangkongming646July6 -: theedit.html-rw-r--r--1Wangkongming wangkongming $JuneTen the: $foote
others.Anyway In order to let everyone no longer detours, introduce me how to do, in fact, very simple. I am using the socket upload, when there is a file upload finished, if it is audio files, I will turn him into MP3 format. Both AMR format and CAF format, as well as any audio format, are available.First of all, download Ffmpeg.exe, it is easy to search, can be from the official website. Because we're just transcoding, we don't introduce him to the principle of work or anything. After downloa
This time from scratch to build a Web project, found that the Web for Spring 3.0 is not much to explain, so take this opportunity to record the configuration of a basic Web project, mainly configuration spring3 process, in fact, most and 2 is similar.
Step one: Build and deploy a Web project (can skip)1. Here to say a simple word about web projects, in fact, a Wen engineering the most basic, only see 3 places:In the root directory (this directory is generally used to call Webcontext or
The default is to use the local installation pathcd/usr/local/php/etc/Vim php-fpm.conf; TheLog file forslow requests;DefaultValue:Not set; Note: Slowlog is mandatoryifRequest_slowlog_timeout is Setslowlog=Log/pool.Log.Slow//can modify the path of the slow log; The timeout forserving a single request after which a PHP backtrace would be, dumped to the' Slowlog 'file. A value of ' 0s ' means ' off '.; Available units: S (econds) (default), M (inutes), H (ours),or D (ays);Defaultvalue:0Request_slo
Define (' Discuz_root ', substr (DirName (__file__), 0,-7));
This is a constant that defines the forum installation root directory in Discuz. Now let's analyze this simple but very practical constant.
first of all, it is assumed that the absolute path of the common.inc.php file in this article is F:\webroot\bbs\include\common.inc.php
This sentence is contained in Discuz's include/common.inc.php, and first let's look at the value of Discuz_root this c
understood that the docbase of the actual directory will be mapped to the virtual project path under the ${tomcat.home}\webapps directory (where the configuration refers to the Userapp project).
Perhaps some people still do not understand what the war package is, in fact, is your project under the Webroot folder content (not add webroot this folder) into a compressed package, suffix with the war, in fact,
, and in the resource bundle class, you specify the location of the resource, which CSS and JavaScript files are included, and dependencies on other packages.
The following code defines the primary resource bundle used by the underlying application template:
If the Appasset class specifies that the resource file is placed in the @webroot directory, the corresponding URL is @web, the resource bundle contains a CSS file Css/site.css, no J
Configuration
Using CXF makes it easy to publish ordinary Java classes as webservice.
First in the official website download Apache-cxf-3.1.1.zip, decompression after the Lib folder to copy all the jar files to the project Webroot/web-inf/lib directory
Then configure Web.xml and add the following
The Contextconfiglocation value specifies the file that we will configure WebService, and classpath information is recorded in the project root. classpath
a high-end store, assume Hermès is a world-famous luxury brand .) You can see that the price of a bag is USD 7000 ." Haha, that's really expensive !" You and your friends said ." Buy a pack for $7000 !" Then you find a good watch, which is priced at $367. And tianmeishi (Timex is the most popular fashion watch brand in the United States. It focuses on low-end products .) Watch, this is absolutely super expensive. But this is definitely a bargain compared to the $7000 bag you just remembered. In
included.
Define a resource package
The resource package is specified as the PHP class that inherits yii \ web \ AssetBundle. the package name is the PHP class name that can be automatically loaded. in the resource package class, you must specify the resource location, which CSS and JavaScript files are contained and their dependencies with other packages.
The following code defines the main resource packages used by the basic application template:
In the above AppAsset class, the specified
Capabilities ......, By default, select Spring 1.2 AOP Libraries-(Why do I have to select these two)Note: you may need to add several spring packages under the lib folder,Spring. jar,Spring-1.2.6.jar,Spring-aop.jar,Spring-beans.jar,Spring-context.jar,Spring-core.jar,Spring-orm.jar,Spring-remoting.jar,Spring-support.jar,Spring-web.jar,Spring-webmvc.jar4. write code (pages and required classes)Ø index. jspSelect WebRoot-> New-> JSP under the Welcome_SS
is destroyed, not only by clearing the cookie, otherwise the malicious user can re-restore the cookie and use the session again. All indexes in the $_session can be empty2) Store the session Webroot file on the Web site or store it in a database as a fileThe default path to save the session on the server can be hijacked, especially in a shared host environment.5. Password1) Apply strong passwordPasswords that require numbers, symbols, uppercase and l
This is a constant in Discuz that defines the forum installation root directory. Now let's analyze this simple but very practical constant.
Define (' Discuz_root ', substr (DirName (__file__), 0,-7));This is a constant in Discuz that defines the forum installation root directory. Now let's analyze this simple but very practical constant.let's start by explaining that the absolute path to the common.inc.php file is assumed to be F:\webroot\bbs\include
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.