This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test 123456 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grails.gsp.PageRenderer groovyPageRenderer | |
void welcomeUser(User user) { | |
def contents = groovyPageRenderer.render(view:"/emails/welcomeLetter", model:[user: user]) | |
sendEmail { | |
to user.email | |
body contents | |
} | |
---------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Is spring-security-core depends of svn grails plugin? | |
burtbeckwith: Sorry about that, there are some issues with releasing plugins and using them in 2.0. I used the release plugin, which depends on the svn plugin, and unfortunately the svn plugin ended up in the pom file. This only affects Grails 2.0 apps since earlier versions don't use the poms. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form> | |
<code> | |
<input name="fieldname" placeholder="Enter any keyword"> | |
<input type="submit" value="Search"> | |
</code> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
url : "chatlog", | |
success : function(message) { | |
if (message && message.length) { | |
var messagesDiv = $('#messages'); | |
messagesDiv.html(message); | |
messagesDiv.animate({ scrollTop: messagesDiv.attr("scrollHeight") - messagesDiv.height() }, 150); | |
} | |
timer = poll(); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove logback-test.xml from the production WAR, so that logback.xml is used instead | |
grails.war.resources = { stagingDir -> | |
delete(file:"${stagingDir}/WEB-INF/classes/logback-test.xml") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.springframework.util.StopWatch; | |
@Around("methodsToBeProfiled()") | |
public Object profile(ProceedingJoinPoint pjp) throws Throwable { | |
StopWatch sw = new StopWatch(getClass().getSimpleName()); | |
try { | |
sw.start(pjp.getSignature().getName()); | |
return pjp.proceed(); | |
} finally { | |
sw.stop(); | |
System.out.println(sw.prettyPrint()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('ConsoleUIApp', ['ui.router','ui.bootstrap','ngAnimate','angular-growl', 'restangular','http-auth-interceptor']) | |
.config(function ($stateProvider, $urlRouterProvider, growlProvider, RestangularProvider, $httpProvider) { | |
// For any unmatched url, redirect to /state1 | |
$urlRouterProvider.otherwise("/home"); | |
$stateProvider | |
.state('home', { | |
url: "/home", | |
templateUrl: "views/home.html", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import grails.transaction.Transactional | |
@Transactional(readOnly = true) | |
class BarService implements Greet{ | |
static scope = "prototype" | |
@Override | |
public String greet() throws IOException{ | |
if (new Random().nextInt(2) == 1) throw new IOException("dummy exception from BarService in...greet"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "MyApp", | |
"version": "0.0.1", | |
"private": true, | |
"main": "app/index.html", | |
"dependencies": { | |
"jquery": "jquery/jquery", | |
"angular": "1.3.0-beta.5", | |
"es6-shim": ">=0.8.0", | |
"bootstrap-sass-official": "~3.1.1", |
OlderNewer