锘??xml version="1.0" encoding="utf-8" standalone="yes"?>激情综合在线,亚洲精品久久久一区二区三区,亚洲国产欧美一区二区三区久久 http://www.aygfsteel.com/yjj317/category/18836.html鍦ㄦ誕韜佺殑騫翠唬閲岋紝鎴戜滑榪涘彇蹇冨お鍒囷紝鎮e緱鎮eけ錛涜櫄鑽e績澶己錛屾垬鎴樺參鍏€備竴蹇冧簤寮哄ソ鑳滐紝鎯熸亹姒滀笂鏃犲悕銆?/description>zh-cnThu, 01 Mar 2007 18:26:56 GMTThu, 01 Mar 2007 18:26:56 GMT60Spring鐨勫浗闄呭寲(鍘熷垱)http://www.aygfsteel.com/yjj317/articles/90973.htmlfish鐨凚logfish鐨凚logSat, 30 Dec 2006 03:22:00 GMThttp://www.aygfsteel.com/yjj317/articles/90973.htmlhttp://www.aygfsteel.com/yjj317/comments/90973.htmlhttp://www.aygfsteel.com/yjj317/articles/90973.html#Feedback0http://www.aygfsteel.com/yjj317/comments/commentRss/90973.htmlhttp://www.aygfsteel.com/yjj317/services/trackbacks/90973.html1錛氬湪MyEclipse涓嬮潰鍒涘緩涓涓猼est鐨刉eb聽 Project錛岀劧鍚庢坊鍔燬pring鐩稿叧鐨勬枃浠訛紝鍦╯rc鏍圭洰褰曚笅鍒涘緩applicationContext.xml鏂囦歡銆?br />
applicationContext.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "
http://www.springframework.org/dtd/spring-beans.dtd">

<beans>

聽聽聽聽聽聽 <bean id="messageSource" 聽class="org.springframework.context.support.ResourceBundleMessageSource">

聽聽聽聽 聽<property name="basename" value="messages"/>

聽聽聽聽聽聽</bean>

聽聽聽聽聽聽聽<bean id="localeResolver" class="org.springframework.web.servlet.i18n.CookieLocaleResolver"/>
聽聽聽
</beans>



2錛氬湪src鏍圭洰褰曚笅闈㈠垱寤?涓祫婧愭枃浠訛細鍒嗗埆鏄?br />
messages_zh.properties
main.title=浣犲ソ

messages_en.properties
main.title=Hello World!

messages_ja.properties
main.title=銇撱倱銇仭銇?br />
messages_ko.properties
main.title=鞎堧厱頃橃嫮雼堦箤

3錛氬湪WebRoot鏍圭洰褰曚笅闈㈠垱寤簍est.jsp

test.jsp

<%@ page language="java"聽 pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="WEB-INF/lib/spring.tld"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
聽 <head>
聽聽聽 <title>Spring鍥介檯鍖?lt;/title>
聽聽</head>
聽 <body>

聽聽聽 <spring:message code="main.title" /><br>

聽聽聽 <input type="button" value="<spring:message code="main.title" />"/><br>

聽聽</body>

</html>

4:淇敼WEB-INF涓嬮潰鐨剋eb.xml

鍦╳eb.xml鍔犲叆
<context-param>
聽聽<param-name>contextConfigLocation</param-name>
聽聽<param-value>
聽聽聽classpath*:/applicationContext*,classpath*:META-INF/applicationContext*.xml
聽聽</param-value>
聽</context-param>
聽<listener>
聽聽<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
聽</listener>

榪欐牱鐢⊿pring鍥介檯鍖栫殑Test.jsp欏甸潰灝卞仛濂戒簡:),姝ょ鏂規硶鏄嚜鍔ㄩ粯璁ゅ綋鍓嶇敤鎴風殑璇█錛屾瘮濡傚鎴風鏄棩璇郴緇燂紝灝辮嚜鍔ㄥ鎵?font size="3">messages_ja.properties璧勬簮鏂囦歡錛屾槸鑻辮緋葷粺錛屽氨鑷姩瀵繪壘messages_en.properties璧勬簮鏂囦歡銆?/font>


娉ㄦ剰浜嬮」:

1:鐢╤ibernate3.0,榪炴帴Mysql5.0鏁版嵁搴撱?br />
聽濡傛灉鐢╤ibernate.properties閰嶇疆鏂囦歡
聽hibernate.connection.url jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8

濡傛灉鐢╤ibernate.cfg.xml閰嶇疆鏂囦歡
jdbc:mysql://localhost:3306/test?useUnicode=true&amp;useUnicode=true&amp;characterEncoding=utf-8&amp;mysqlEncoding=utf8


2:欏甸潰鐨勭紪鐮佹柟寮忥紝搴旇閫夌敤utf-8
<%@ page language="java"聽 pageEncoding="UTF-8"%>


3:鍒涘緩鐨勬暟鎹簱鐨勭紪鐮佹柟寮忎篃搴旇閫夌敤utf-8錛屼互鍙婅〃錛屽瓧孌電殑緙栫爜鏂瑰紡閮藉簲閫夌敤utf-8

娉ㄦ剰浠ヤ笂3鐐瑰氨鍙互瑙e喅鍥介檯鍖栨椂錛屾墍鍑虹幇鐨勯〉闈㈡樉紺轟貢鐮侀棶棰橈紝浠ュ強鎻掑叆闊╄鏃訛紝鍑虹幇鐨刣ata too long for column闂.









]]>
主站蜘蛛池模板: 西乡县| 河北区| 麟游县| 安庆市| 定陶县| 勃利县| 晴隆县| 上杭县| 攀枝花市| 固原市| 探索| 古交市| 河北省| 乌拉特前旗| 连山| 五原县| 恭城| 泸西县| 青川县| 会昌县| 卢湾区| 万载县| 乌海市| 荃湾区| 云阳县| 句容市| 青海省| 宁陵县| 乌海市| 临夏市| 南通市| 桐梓县| 北京市| 邻水| 历史| 芜湖市| 新建县| 新郑市| 绥阳县| 隆安县| 丹寨县|