锘??xml version="1.0" encoding="utf-8" standalone="yes"?>深夜福利视频在线观看,亚洲视频一区,亚洲精品乱码视频http://www.aygfsteel.com/ThinkingTalking/category/42146.htmlDo what I can do!zh-cnTue, 13 Oct 2009 17:13:42 GMTTue, 13 Oct 2009 17:13:42 GMT60銆愯漿銆慓rails寮鍙戣呴渶瑕佺煡閬撶殑10涓妧宸?/title><link>http://www.aygfsteel.com/ThinkingTalking/archive/2009/10/13/298035.html</link><dc:creator>ThinkingTalking</dc:creator><author>ThinkingTalking</author><pubDate>Tue, 13 Oct 2009 02:51:00 GMT</pubDate><guid>http://www.aygfsteel.com/ThinkingTalking/archive/2009/10/13/298035.html</guid><wfw:comment>http://www.aygfsteel.com/ThinkingTalking/comments/298035.html</wfw:comment><comments>http://www.aygfsteel.com/ThinkingTalking/archive/2009/10/13/298035.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/ThinkingTalking/comments/commentRss/298035.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/ThinkingTalking/services/trackbacks/298035.html</trackback:ping><description><![CDATA[寮曠敤鑷細http://www.groovycn.com/2009/02/grails-10-tips/<br /> <p>濡傛灉瑕佸垪涓捐繎浜涘勾鏉ava棰嗗煙涓渶浠や漢嬋鍔ㄧ殑浜嬩歡錛孏rails鐨勮癁鐢熺粷瀵瑰簲璇ユ涓婃湁鍚嶃傚湪鎵撳紑<a >Grails瀹樻柟緗戠珯</a>鏃訛紝 浣犱細鍦ㄦ祻瑙堝櫒鐨勬爣棰樻爮涓婄湅鍒拌繖鏍風殑鍐呭錛?#8220;Grails - 瀵繪壘灝辨緇撴潫”銆傝櫧鐒惰繖鍙ヨ瘽涓嶈寰楅傜敤浜庢墍鏈夊満鍚堬紝浣嗗浜庝笉灝戜粠浜婮ava Web寮鍙戠殑浜烘潵璇達紝璧炲悓鑰呮亹鎬曚笉鍦ㄥ皯鏁般傜敱浜庡叿澶嘡ails椋庢牸鐨勬鏋躲佸吋瀹圭粷澶у鏁癑ava璇硶鐨凣roovy鍔ㄦ佽璦銆佷互涓氱晫鍙g鑹ソ鐨勬鏋朵負鍩? 紜銆佸浼佷笟鐜版湁Java寮鍙戣祫浜х殑淇濇姢銆丳lugin鏋舵瀯絳夌壒鐐癸紝鍐嶅姞涓奡pring紺懼尯鐨勫己鍔涗粙鍏ワ紝Grails琛屾儏鐪嬫定搴旇鏄剰鏂欎箣涓殑銆?/p> <p>鐒惰孏rails鍗存病鏈夌湅涓婂幓閭d箞綆鍗曪紝鍦ㄥ叾鍖呰鐨勭硸琛d箣涓嬶紝鏈夌潃璁稿浣滀負Java Web寮鍙戣呬笉寰椾笉浜嗚В鐨勭煡璇嗐傛渶榪戯紝<a >Peter Delahunty</a>鍙戣〃浜嗛涓?a >Grails寮鍙戣呴渶瑕佺煡閬撶殑10涓妧宸?/a>鐨勫崥鏂囥備笉瑕佽鏍囬鎵榪鋒儜浜嗭紝榪欓噷鎵璇寸殑“鎶宸?#8221;鍙笉鏄偅浜涜璦灞傞潰鐨?#8220;鎶宸?#8221;錛屾妸瀹冧滑縐頒負“寤鴻”鎭愭曟洿鍚堥備竴浜涖?br /> <br /> 鎶宸?錛氭妸Grails鐨勪功綾嶄拱鏉ヨ璇匯傚姝わ紝Peter Delahunty鎺ㄨ崘浜嗗凡鍑虹増鐨勩奃efinitive Guide to Grails 2nd edition銆嬪拰銆奊roovy and Grails Recipes銆嬶紝浠ュ強鍗沖皢鍑虹増鐨勩奊rails in Action銆嬨?/p> <p>鎶宸?錛氬涔燝roovy錛屽茍鎸夌収Groovy榪涜鎬濊冦侾eter Delahunty閫氳繃涓涓緥瀛愯鏄庝簡Java鎬濈淮鍜孏roovy鎬濈淮鐨勪笉鍚屻?/p> <blockquote> <p>榪欏効鏈変釜濂戒緥瀛愶細</p> <p>浼犳挱鎿嶄綔絎︼紙spread operator錛夛細*</p> <p>鍦↗ava涓紝瑕佹兂閬嶅巻涓緇勪漢騫舵敹闆嗕漢鍚嶃傛垜鍙兘寰楄繖鏍峰啓錛?/p> <pre style="border: 1px dashed #999999; padding: 5px; overflow: auto; width: 100%; color: #000000; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; background-color: #eeeeee;"><code>List names = new ArrayList();<br /> <br /> for (Iterator iterator = people.iterator(); iterator.hasNext();) {<br /> <br /> Person person = (Person) iterator.next();<br /> <br /> names.add(person.getName());<br /> <br /> }<br /> <br /> System.out.println(names);<br /> <br /> </code></pre> <p>鐢℅roovy錛屾垜浼氳繖涔堝啓錛?/p> <pre style="border: 1px dashed #999999; padding: 5px; overflow: auto; width: 100%; color: #000000; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; background-color: #eeeeee;"><code>def names = people*.name<br /> <br /> println names<br /> <br /> </code></pre> <p>鍛靛懙錛岀畝鍗曞惂銆傛垜榪樺彲浠ヨ繖鏍峰啓錛?/p> <pre style="border: 1px dashed #999999; padding: 5px; overflow: auto; width: 100%; color: #000000; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; background-color: #eeeeee;"><code>def names = people.collect {it.name}<br /> <br /> println names<br /> <br /> </code></pre> </blockquote> <p>鍦ㄨ繖涓緩璁腑錛屼粬鍒椾婦浜嗕竴浜涜祫婧愶細</p> <ul> <li><a >Groovy瀹樻柟緗戠珯</a></li> <li><a >PLEAC</a></li> </ul> <p>浠ュ強涓浜涗功綾嶏細</p> <ul> <li>Programming Groovy</li> <li>Groovy Recipies</li> <li>Groovy in action</li> </ul> <p>鎶宸?錛氫簡瑙rails鐨勫悇涓彃浠躲侾eter Delahunty緇欏嚭鐨勭悊鐢憋細Grails鏈韓鏄釜鎻掍歡緋葷粺錛岃屼笖鐜板湪宸茬粡鏈夊ぇ閲忕殑鎻掍歡鍙緵涓嬭澆銆傚湪鑷瀹炵幇涔嬪墠錛屼笉濡ㄧ湅鐪嬪叾涓槸鍚︽湁縐版墜鐨勩?/p> <p>鎶宸?錛氬涔燞ibernate鍜孲pring銆傝繖涓鐐逛笉闅劇悊瑙o紝鏃㈢劧Grails鏄緩绔嬪湪榪欎簺宸ュ叿涔嬩笂鐨勶紝浜嗚В榪欎簺宸ュ叿鏈韓鐨勪嬌鐢紝瀵逛簬鐔熺粌浣跨敤Grails鑷劧澶ф湁鑴劇泭銆?/p> <p>鎶宸?錛氫嬌鍗曞厓嫻嬭瘯銆侀泦鎴愭祴璇曞拰涓鑸祴璇曠殑鑷姩鍖栥侾eter Delahunty鍦ㄨ繖閲屾帹鑽愪簡涓や釜Grails鐨勬彃浠訛細<a >Testing Plugin</a>鍜?a >Functional testing plugin</a>銆傚墠鑰呭皢鎴愪負Grails 1.1鐨勫唴緗彃浠躲?/p> <p>鎶宸?錛氫嬌鐢ㄥソ鐨処DE銆侾eter Delahunty琛ㄧず錛屼粬鑷繁浣跨敤鐨勬槸Intellij錛屼絾瀵逛簬Netbeans涔熷瘎浜堝帤鏈涖?/p> <p>鎶宸?錛氬涔犲茍浣跨敤HTML W3C鏍囧噯銆?#8220;閬靛驚鏍囧噯灝嗘秷闄や綘90%鐨勯棶棰?#8221;錛孭eter Delahunty濡傛槸璇淬?/p> <p>鎶宸?錛氱湅涓婂幓涓嶉敊涓瀹氫笉閿欍傝繖鍏跺疄璇寸殑鏄?#8220;闈㈠瓙宸ョ▼”錛岄氳繃鎻愰珮搴旂敤鐨勫瑙傝璁℃潵鎻愰珮搴旂敤鐨勭珵浜夊姏銆侾eter Delahunty緇欏嚭浜?涓祫婧愶細</p> <ul> <li><a >99designs.com</a></li> <li><a >鍦嗚鐭╁艦浜х敓鍣?/a></li> </ul> <p>鎶宸?錛氫嬌鐢‵irefox涓婄殑Firebug銆傚浜庢祻瑙堝櫒绔殑璋冭瘯宸ヤ綔錛孎irebug緇濆鏄竴涓繀澶囧伐鍏楓?/p> <p>鎶宸?0錛氳窡涓奊roovy鍜孏rails紺懼尯鐨勬浼愩傚湪榪欐渶鍚庝竴涓緩璁腑錛孭eter Delahunty緇欏嚭浜嗚幏鍙朑roovy鍜孏rails淇℃伅鐨勪富瑕佽祫婧愰摼鎺ワ細</p> <ul> <li><a >Grails瀹樻柟緗戠珯</a></li> <li><a >Groovy鍜孏rails鐩稿叧鐨勫崥瀹?/a></li> <li><a >Grails鍒涘浜篏raeme Rocher鐨凾witter</a></li> <li><a >Groovy欏圭洰棰嗗浜篏uillaume Laforge鐨凾witter</a></li> <li><a >Groovyblogs.org鐨勫垱濮嬩漢Glen Smith</a></li> </ul> <p>璇峰姟蹇呴槄璇籔eter Delahunty鐨?a >鍘熸枃</a>銆傚浜嶨rails鐨勬柊鑰佷嬌鐢ㄨ咃紝浣犻兘鍙互浠嶱eter Delahunty鐨勫緩璁腑鏈夋墍鏀惰幏銆傚叧浜嶪nfoQ涓枃绔橤roovy鍜孏rails鐨勫叾瀹冨唴瀹癸紝璇瘋闂?a >榪欓噷</a>鍜?a >榪欓噷</a>銆?/p> <br /> <img src ="http://www.aygfsteel.com/ThinkingTalking/aggbug/298035.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/ThinkingTalking/" target="_blank">ThinkingTalking</a> 2009-10-13 10:51 <a href="http://www.aygfsteel.com/ThinkingTalking/archive/2009/10/13/298035.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Grails in Eclipsehttp://www.aygfsteel.com/ThinkingTalking/archive/2009/10/13/298034.htmlThinkingTalkingThinkingTalkingTue, 13 Oct 2009 02:44:00 GMThttp://www.aygfsteel.com/ThinkingTalking/archive/2009/10/13/298034.htmlhttp://www.aygfsteel.com/ThinkingTalking/comments/298034.htmlhttp://www.aygfsteel.com/ThinkingTalking/archive/2009/10/13/298034.html#Feedback0http://www.aygfsteel.com/ThinkingTalking/comments/commentRss/298034.htmlhttp://www.aygfsteel.com/ThinkingTalking/services/trackbacks/298034.htmlImporting a Grails Project

Grails automatically creates Eclipse project and classpath files for you. The Groovy plugin is helpful for working with Grails projects, but not required in order to import a project: do not rely on it for assistance.To import a Grails project just right-click in the "Package Explorer" and select "Import" then "Existing project into Workspace" and "Browse" to the location of your project.

Then immediately click "Ok" followed by "Finish" and your project will be set-up. Using other methods of importing the project may prove to be problematic due to compile location.

There is a known issue that Grails will not run properly if you try to use the root directory of your drive as your project, or paths with spaces.


Setting up Eclipse Environment Variables

You will need to create an Eclipse classpath variable called GRAILS_HOME that points to the location where you installed Grails for the project to build successfullly by going to Windows -> Preferences… -> Java -> Build path -> Classpath Variables -> New.

If you don't already have GRAILS_HOME as part of your standard environment, in order to run your Grails project, you will need to establish that value in the Run dialog (Run...) under the Environment tab, to the same value as above.

If your Grails project has Grails plugins installed then you will need to add the directories directly under the plugins/src/ folder to your Eclipse source path. This is done through right clicking on the folder (usually called "Groovy" or "Java") then selecting build path -> source folder. Otherwise you may get errors in the import statements.

Also, if you are using JSP you will need to add your JDK's tools.jar library to your project classpath otherwise jetty will display compilation errors. See this page for info: http://nuin.blogspot.com/2005/05/launch-jetty-from-eclipse-solving.html

If you are using the Eclipse Groovy plugin then make sure you enable the preference 'Disable Groovy Compiler Generating Class Files' (newer versions: Project -> Preferences -> Groovy Project Preferences / older versions: Windows -> Preferences -> Groovy Preferences). By default this option is disabled and generates class files for your groovy files, and stores them in the basedir of your Grails project. When these class files are generated, unexpected behaviour is encountered like not able to generate controllers and views for your domain classes.

THIS DOES NOT APPLY IF YOU INTEND TO USE DEBUGGING (read the section 'Step debugging' below)



Running a Grails application

Grails also automatically creates an Eclipse run configuration for you. To run the project you are in use the "Run" dropdown to open the "Run" dialog then under "Java Applications" find the name of your project select it and click "Run". The Grails application will load embedded inside Eclipse, any changes made inside the Eclipse project can be auto-reloaded.

If you are getting exceptions like

org.mortbay.util.MultiException[java.io.FileNotFoundException: {yourpath}/web-app]
at org.mortbay.http.HttpServer.doStart(HttpServer.java:731)
at org.mortbay.util.Container.start(Container.java:72)
at grails.util.GrailsMain.main(GrailsMain.java:67)
then you need to do is run the ant target:
grails dev package
which will package up grails into the web-app directory in the same way as the "grails run-app" command will. This is then used as the base for eclipse to execute.

For some other errors or quirky behavior, it is often helpful to run the command

grails clean

Step Debugging with Eclipse

You can step debug a Grails application if you install the latest build of the Groovy Eclipse plug-in.

Eclipse debugging depends on the class files generated by the Groovy compiler, so make sure 'Disable Groovy Compiler Generating Class Files' is not checked (Project -> Properties -> Groovy Project Properties) and the output folder is set to e.g. "bin-groovy". Then edit the ".classpath" file in your project directory and manually remove the entry for "bin-groovy".
To debug an application, do the following:
  • Open up the Groovy file you want to debug (lets say a controller called {{BookController.groovy}}) then set a break point on the line you want to stop at. (set a breakpoint by double clicking in the far left "gutter")
  • Now debug the application in the same way as you did in the above section on "Running a Grails application" except with the "Debug" menu.
  • Load your browser and navigate to the action that calls the code.
Eclipse should then stop at the appropriate place and you can then inspect variables and step through the code. If you have the Grails source code set-up on your Source path you can step into that code too.

Adding domain classes etc.

You can configure grails as an "External Tool", allowing you to create domain classes etc. from within Eclipse:

  1. Select "Run > External Tools > External Tools Configurations...".
  2. Double-click "Program"
  3. Enter a name of "Grails".
  4. Browse the file system for the location of grails or grails.bat.
  5. Set the working directory to "${project_loc}".
  6. Set the arguments as "${string_prompt}".
  7. Under the "Refresh" tab, set to refresh the "project containing the selected resource" upon completion.
  8. Under the "Common" tab, tick "Display in favorites menu".
You can then run Grails by clicking the down arrow next to the external tool icon (run with a suitcase) and selecting "Grails", for example:
  1. Choose "Grails" from the external tools drop-down.
  2. Enter "create-domain-class" in the dialogue box.
  3. In the console window, follow the prompts as normal.
  4. Open your new class from grails-app/domain.

Editing GSP files

The gsp files are just jsp files with a special taglib. The extension gsp has to be added as follows:

  • General -> Editors -> File Associations: add *.gsp and link the JSP Editor to it.
  • General -> Content Types Fold out Text -> JSP and add *.gsp
This enables jsp editing for the gsp files. To enable code completion add the following at the start of the gsp (Grails before version 1.1 only):
<%@ taglib prefix="g" uri="/web-app/WEB-INF/tld/grails.tld" %>
Since Grails 1.1 this no longer works.

Unit Tests

To run Grails/Groovy unit tests, the easiest way is just to create a junit run configuration, but specifying "groovy.util.AllTestSuite" as the main class. More info on general groovy unit testing in grails here

To run a single test, create a run-config as described above or duplicate an existing entry. Select "Run a single test", select your project and the test class. Save and test your config. You can also rerun a single test in the (g)unit test view by clicking with the right mouse button on an single test and selecting "Run".

Troubleshooting

  1. If you getting the following error every time you save *.groovy file in your project:
An internal error occurred during: "Building workspace".
BUG! exception in phase 'conversion' in source unit '...' Error:
duplicate class declaration for name: … and class:
org.codehaus.groovy.ast.ClassNode@...[name:...]


try the following:
    • Right click on package explorer's project name and open "Properties..." dialog.
    • Select "Builders" and make sure that "Groovy Builder" is checked.
    • Select "Java Compiler/Building" and check "Enable project specific settings".
    • Append "*.groovy" to "Filtered Resources" text field, to prevent ".groovy" files being copied to the output directory. Note that the path separator is "," not ";"
    • Apply changes and close dialog.
    • Clean your project. Make sure that the output directory doesn't contain "*.groovy" files
  1. If Eclipse complains that it can not find the sources where breakpoints are set ensure the following:
    • Step filtering is enabled for groovy.*, org.codehaus.* (more about this http://groovy.codehaus.org/Debugging+with+Eclipse )
    • Build out put for the project is in a separate folder (say /bin ). Make sure this is present for Project->Properties->Groovy Project Properties
  2. Few other recommendations:
    • Make sure to add all the libraries from grails-app/lib folder to the project
    • Using verbose logging/tracing through log4j.properties until everything works from the Eclipse IDE. Sometimes if some library is not found, unless it is printed in the console, it is difficult to find out what went wrong.
    • Make sure to use the same JDK for tools.jar as well as the runtime jar rt.jar. Do note sometimes using the JRE instead of rt.jar causes problems.
    • Sometimes "launch configuration" generated by grails is not in sync with the way ant's build.xml works. In Grails 0.3 ensure that following VM parameters (do note not program arguments, but VM arguments ) are set "-Dorg.mortbay.xml.XmlParser.NotValidating=true". Without this there will be XML Parser exception thrown when launched from the IDE.

Brute Force method:

If running from IDE has issues, most likely it is because some library is missing. Ensure that all libraries under GRAILS_HOME/dist, GRAILS_HOME/ant/lib, GRAILS_HOME/lib and your project folder/lib are added to the build path of the project.



ThinkingTalking 2009-10-13 10:44 鍙戣〃璇勮
]]>
鎼緩Grails寮鍙戠幆澧?/title><link>http://www.aygfsteel.com/ThinkingTalking/archive/2009/10/13/298033.html</link><dc:creator>ThinkingTalking</dc:creator><author>ThinkingTalking</author><pubDate>Tue, 13 Oct 2009 02:40:00 GMT</pubDate><guid>http://www.aygfsteel.com/ThinkingTalking/archive/2009/10/13/298033.html</guid><wfw:comment>http://www.aygfsteel.com/ThinkingTalking/comments/298033.html</wfw:comment><comments>http://www.aygfsteel.com/ThinkingTalking/archive/2009/10/13/298033.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/ThinkingTalking/comments/commentRss/298033.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/ThinkingTalking/services/trackbacks/298033.html</trackback:ping><description><![CDATA[1銆丣DK瀹夎銆?br /> 2銆佸埌瀹樼綉涓婁笅杞絞rails銆俬ttp://www.grails.org/Download<br /> 3銆佽В鍘嬶紝閰嶇疆GRAILS_HOME錛孭ath<br /> 4銆佸湪鍛戒護琛岃緭鍏ワ細grails銆傚鏋滃嚭鐜板府鍔╀俊鎭紝璇存槑瀹夎鎴愬姛銆?br /> 5銆佸紑濮嬪簲鐢ㄧ▼搴忋?br /> 閫夋嫨涓涓伐浣滅洰褰曪紝鍦ㄥ懡浠よ杈撳叆錛歡rails create-app demo銆?br /> 浼氬湪褰撳墠鐩綍涓嬬敓鎴愪竴涓猟emo鏂囦歡澶癸紝閲岄潰鏈夎嚜鍔ㄧ敓鎴愮殑濂藉鏂囦歡錛岃繖灝辨槸涓涓猤rails欏圭洰銆?br /> The "create-app" target created a Grails data source artifact for you in the "<..>/grails-app/conf" directory called DataSource.groovy with closures for each of the standard environments: Development, TestData, and Production.<br /> 榪欏氨鏄竴涓彲榪愯鐨剋eb欏圭洰銆傝緭鍏? grails run-app<br /> 鍦ㄦ祻瑙堝櫒杈撳叆:http://localhost:8080/demo<br /> 6銆乧d 鍒癲emo鐩綍錛屽湪鍛戒護琛岃緭鍏ワ細<span style="color: #000099;">grails create-domain-class User</span>錛屽垱寤轟竴涓猆ser瀹炰綋綾匯?br />    cd鍒癲emo\grails-app\domain鐩綍涓嬶紝榪欓噷瀛樻斁鎵鏈夌殑瀹炰綋綾匯備慨鏀筓ser.groovy鏂囦歡涓猴細<br /> <pre>class User {<br /> String name<br /> String password<br /> <br /> String toString() {<br /> " $name : $password "<br /> }<br /> <br /> static constraints = {<br /> name(blank: false )<br /> password(blank: false , size: 6 .. 16 )<br /> }</pre> 7銆佸湪鍛戒護琛岃緭鍏ワ細<span style="color: #000099;">grails generate-all User銆?/span><span style="color: #000099;">涓篣ser浜х敓鎵鏈塁RUD鎿嶄綔闇瑕佺殑浠g爜錛堝鎺у埗鍣║serController.groovy錛夊拰欏甸潰錛堝list.gsp錛?br /> 8銆佽緭鍏ワ細</span><span style="color: #000099;">grails create-controller Login鐢熸垚鎺у埗鍣?/span><br /> <span style="color: #000099;">9銆?/span><span style="color: #000099;">淇敼demo\grails-app\controllers\LoginController.groovy鐨勫唴瀹逛負錛?br /> </span> <pre>class LoginController {<br /> def loginService<br /> <br /> def index = { }<br /> <br /> def login = {<br /> User u = new User()<br /> u.properties = params<br /> if (params.name && params.password) {<br /> <br /> def user = loginService.check(u)<br /> <br /> if (user) {<br /> flash.message = "Welcome ${user.name}"<br /> render(view: "ok", model: [user: user])<br /> } else {<br /> flash.error = "Invalid ${u.name} with ${u.password}"<br /> render(view: "login", model: [user: u])<br /> }<br /> } else {<br /> render(view: "login", model: [user: u])<br /> }<br /> }<br /> }</pre> 10銆佽緭鍏ワ細<span style="color: #000099;">grails create-service Login銆傚垱寤轟笟鍔¢昏緫銆?/span><br /> <span style="color: #000099;">11銆?/span><span style="color: #000099;">淇敼demo\grails-app\services\LoginService.groovy鐨勫唴瀹逛負錛?br /> </span> <pre>class LoginService {<br /> <br /> boolean transactional = true<br /> <br /> def check(User u) {<br /> def user = User.findWhere(name: u.name, password: u.password)<br /> return user<br /> }<br /> <br /> def serviceMethod() {<br /> // TODO<br /> }<br /> }<br /> 12銆?span style="color: #000099;">淇敼demo\grails-app\conf\ApplicationBootStrap.groovy錛屽皢涓涓猆ser瀹炰緥淇濆瓨鍒版暟鎹簱(grails鑷甫hsqldb鍜宩etty)涓紝鍐呭濡備笅錛?/span><br /> class ApplicationBootStrap {<br /> <br /> def init = { servletContext -><br /> new User(name: "demo", password: "123456").save()<br /> }<br /> def destroy = {<br /> }<br /> }<br /> 13銆?span style="color: #000099;">鍦?#8220;鍛戒護琛?#8221;涓紝杈撳叆“grails run-app”錛岃繍琛屾垜浠殑Web搴旂敤</span><br /> <br /> </pre> 14銆?span style="color: #000099;">鎵撳紑嫻忚鍣紝杈撳叆錛?/span><a href="http://localhost:8080/demo/login/login"><span style="color: #000099;">http://localhost:8080/demo/login/login</span></a><span style="color: #000099;"> 錛屽湪Name澶勮緭鍏emo錛孭assword澶勮緭鍏?23456錛岀偣鍑?#8216;Login’錛?/span><br /> <span style="color: #000099;"><br /> </span> <img src ="http://www.aygfsteel.com/ThinkingTalking/aggbug/298033.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/ThinkingTalking/" target="_blank">ThinkingTalking</a> 2009-10-13 10:40 <a href="http://www.aygfsteel.com/ThinkingTalking/archive/2009/10/13/298033.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鎼緩Groovy寮鍙戠幆澧?/title><link>http://www.aygfsteel.com/ThinkingTalking/archive/2009/10/13/298024.html</link><dc:creator>ThinkingTalking</dc:creator><author>ThinkingTalking</author><pubDate>Tue, 13 Oct 2009 01:58:00 GMT</pubDate><guid>http://www.aygfsteel.com/ThinkingTalking/archive/2009/10/13/298024.html</guid><wfw:comment>http://www.aygfsteel.com/ThinkingTalking/comments/298024.html</wfw:comment><comments>http://www.aygfsteel.com/ThinkingTalking/archive/2009/10/13/298024.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/ThinkingTalking/comments/commentRss/298024.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/ThinkingTalking/services/trackbacks/298024.html</trackback:ping><description><![CDATA[1銆佸畨瑁匤DK銆備笉鐭ラ亾鎬庝箞瀹夎鐨勫彲鐧懼害涓涓嬨?br /> 2銆佸畨瑁匞DK銆備竴鍏變笁姝ワ細<br /> 錛?錛変笅杞斤細http://dist.groovy.codehaus.org/distributions/groovy-binary-1.6.5.zip<br /> 錛?錛夐厤緗瓽ROOVY_HOME錛屽拰閰嶇疆JAVA_HOME涓鏍?br /> 錛?錛夐厤緗甈ath銆傚皢GROOVY_HOME涓嬬殑bin娣誨姞鍒皃ath涓?br /> 3銆丠ello World!<br /> 鍦╳indows鍛戒護琛岀幆澧冧笅杈撳叆錛歡roovyConsole 錛屽洖杞︺?br /> 鍦ㄦ枃鏈尯鍩熻緭鍏ワ細<span style="color: #000000;">println </span><span style="color: #000000;">‘</span><span style="color: #000000;">Hello World!</span><span style="color: #000000;">‘</span><span style="color: #000000;"> 鐒跺悗鍥炶濺銆?br /> 鎸塩trl+R緇勫悎閿繍琛屻?br /> </span><br /> <br /> <br /> <br /> <img src ="http://www.aygfsteel.com/ThinkingTalking/aggbug/298024.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/ThinkingTalking/" target="_blank">ThinkingTalking</a> 2009-10-13 09:58 <a href="http://www.aygfsteel.com/ThinkingTalking/archive/2009/10/13/298024.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> 主站蜘蛛池模板: <a href="http://" target="_blank">绵阳市</a>| <a href="http://" target="_blank">松潘县</a>| <a href="http://" target="_blank">凤庆县</a>| <a href="http://" target="_blank">绥宁县</a>| <a href="http://" target="_blank">西藏</a>| <a href="http://" target="_blank">芜湖市</a>| <a href="http://" target="_blank">湖南省</a>| <a href="http://" target="_blank">册亨县</a>| <a href="http://" target="_blank">南澳县</a>| <a href="http://" target="_blank">城口县</a>| <a href="http://" target="_blank">平远县</a>| <a href="http://" target="_blank">土默特左旗</a>| <a href="http://" target="_blank">鄂托克前旗</a>| <a href="http://" target="_blank">南汇区</a>| <a href="http://" target="_blank">平顺县</a>| <a href="http://" target="_blank">噶尔县</a>| <a href="http://" target="_blank">陈巴尔虎旗</a>| <a href="http://" target="_blank">土默特左旗</a>| <a href="http://" target="_blank">昂仁县</a>| <a href="http://" target="_blank">西乌珠穆沁旗</a>| <a href="http://" target="_blank">昌江</a>| <a href="http://" target="_blank">安溪县</a>| <a href="http://" target="_blank">游戏</a>| <a href="http://" target="_blank">多伦县</a>| <a href="http://" target="_blank">阳山县</a>| <a href="http://" target="_blank">西城区</a>| <a href="http://" target="_blank">霍林郭勒市</a>| <a href="http://" target="_blank">北海市</a>| <a href="http://" target="_blank">水城县</a>| <a href="http://" target="_blank">海晏县</a>| <a href="http://" target="_blank">泊头市</a>| <a href="http://" target="_blank">昆山市</a>| <a href="http://" target="_blank">井冈山市</a>| <a href="http://" target="_blank">桐柏县</a>| <a href="http://" target="_blank">鹤壁市</a>| <a href="http://" target="_blank">荥阳市</a>| <a href="http://" target="_blank">长丰县</a>| <a href="http://" target="_blank">城固县</a>| <a href="http://" target="_blank">西平县</a>| <a href="http://" target="_blank">长子县</a>| <a href="http://" target="_blank">普格县</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>