Skip to content
Advertisement

Tag: groovy

Grails scaffolding does show nothing

I use grails 2.4.4 I added dependenci in my BuildConfig: and add plugin: Create domain Person: And controller: Also try to use: static scaffold = true, it also doesn’t work. I try to delete my package target. But in my url (http://localhost:8090/grails-com.learning/person) I see nothing There is no the plugin: Answer See the project at https://github.com/jeffbrown/adamscaffolding. grails-app/conf/BuildConfig.groovy#L49-L75 (there is no

Groovy Shell Sandboxing Best Practices

I am trying to set up a Groovy Shell sandbox that can execute untrusted code. These untrusted codes are provided by the end users (developers) as behaviour configurations, e.g. how to determine if a person is high net worth. So, they really are part of the main program. I need to make sure that I am not vulnerable to any

Why does my Gremlin traversal add only one edge?

As described in another question, I am attempting to add several “identity” vertices into a “group” vertex. Based on the recipe recommendation, I’m trying to write the traversal steps in such a way that the traversers iterate the identity vertices instead of appending extra steps in a loop. Here’s what I have: This always returns a value of 1, no

Proper Lifecycle Order For Annotation Processing In Maven

I’m currently working on a java project where I need to generate and compile JPA metamodel classes as part of the build. I did some research and found an answer here: Generate the JPA metamodel files using maven-processor-plugin – What is a convenient way for re-generation? that seems like a reasonable solution. The problem is, my project also contains some

How to pass your username and password in a get request with groovy?

I send GET request and receive error 500 I am sure that my api work true. How to pass your username and password in a get request with groovy? Answer The way you wrote the “Authorization” header is incorrect. For basic authentication, you need to encode the username and password and use it alongside the “Basic” keyword.

Groovy createCriteria issue with joined table

I have a domain class Coach which has a has many relationship to another domain class CoachProperty. Hibernate/Grails is creating a third joined table in the database. In the example below I am trying to fetch the coaches which both have foo AND bar for their text value. I have tried different solutions with ‘or’ and ‘and’ in Grails which

Unable to load a groovy classes

I am trying to serialize and deserialize a groovy object with the below class in the jenkins pipeline. SerializationUtil.groovy Test.groovy Jenkins pipeline script I was able to serialize the object but not deserialize. I am getting the below exception. From the exception, I could see that GroovyClassLoader is not called and I assume that might be the issue. Answer The

Advertisement