2017-03-05 7 views
0

私はgrailsをダウンロードしました。3.私はgrails 1に関する古い本を持っています。私は同じ問題があります。Grails 3アプリケーションin intellij

grails> create-app qotd 
| Error Command not found create-app 
Did you mean: create-script or create-taglib or create-unit-test? 

なぜ機能しないのですか?

project

私はフォルダのCSSや画像を見つけることは不可能であるデコレータ

<html> 
<head> 
    <title>QOTD &raquo; <g:layoutTitle/></title> 
    <link rel="stylesheet" href=" 
    <g:resource dir='css' file='snazzy.css' /> 
    " /> 
    <g:layoutHead /> 
</head> 
<body> 
<div id="header"> 
    <img src=" 
    <g:resource dir='images' file='logo.png'/> 
    " alt="logo"/> 
</div> 
<g:layoutBody /> 
</body> 
</html> 

を作成したいです。彼らの道は何ですか? Grailsので

答えて

0

は(あなたのbuild.gradleファイルを確認してください)

compile 'com.bertramlabs.plugins:asset-pipeline-grails:2.8.2' 

がデフォルトで使用されているプラ​​グインを3.xの

あなたのデコレータは次のようになります。

<html> 
<head> 
    <title>QOTD &raquo; <g:layoutTitle/></title> 
    <asset:stylesheet href="snazzy.css" /> 
    <g:layoutHead /> 
</head> 
<body> 
<div id="header"> 
    <asset:img src="logo.png" alt="logo"/> 
</div> 
<g:layoutBody /> 
</body> 
</html> 

と、すべての静的ファイルgrails-app/assetsになります。

関連する問題