Grails에 새로 왔습니다. 3 일 전에 Grails를 배우기 시작합니다. 샘플 Grails 애플리케이션에서 트위터 부트 스트랩을 사용하고 싶습니다. 나는 이것을 따라 가고있다 tutorialTwitter Bootstrap Grail 플러그인이 작동하지 않습니다.
나는 grails-app/conf/BuildConfig 파일에 runtime ':twitter-bootstrap:2.3.2'
을 추가했다.
다음은 bootstrap을 사용하려는 list.gsp 파일입니다.
<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
<title>My Posts</title>
<r:require modules="bootstrap"/>
</head>
<body>
<g:link controller="post" action="edit">
Create a new post
</g:link>
<div class="well">
<h1>My Posts</h1>
<g:each in="${posts}" var="post">
<div>
<h2>${post.title}</h2>
<p>${post.teaser}</p>
<p>Last Updated: ${post.lastUpdated}</p>
<g:link controller="post" action="edit" id="${post.id}">
Edit this post
</g:link>
<g:link controller="post" action="view" id="${post.id}">
View this post
</g:link>
</div>
</g:each>
</div>
</body>
</html>
다음은 그 작동하지 내 플러그인 목록
plugins {
runtime ":hibernate:$grailsVersion"
runtime ":jquery:1.8.3"
runtime ":resources:1.2"
runtime ':twitter-bootstrap:2.3.2'
// Uncomment these (or add new ones) to enable additional resources capabilities
//runtime ":zipped-resources:1.0"
//runtime ":cached-resources:1.0"
//runtime ":yui-minify-resources:0.1.5"
build ":tomcat:$grailsVersion"
runtime ":database-migration:1.3.2"
compile ':cache:1.0.1'
}
입니다. 저는 Grails에서 완전히 새로 왔습니다. 왜 작동하지 않는지 모르겠습니다. 도와주세요 ..
당신이 설치된 플러그인의 목록, 콘솔의 출력을 보여줄 수에 같은 레이아웃 폴더에 main.gsp을 변경하는 추가 하시겠습니까? – havenchyk
@baxxabit 내 질문이 업데이트되었습니다. 확인해주십시오. 그 오류를 보여주지 않습니다. 플러그인이 성공적으로 설치되었지만 gsp 페이지에 부트 스트랩 기능이 표시되지 않습니다. –
기본 레이아웃을 편집하고 있습니까? https://github.com/groovydev/twitter-bootstrap-grails-plugin#edit-your-sitemesh-layout – havenchyk