Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle Archetype fails to replace keywords in a java file when input parameters annotated with more than one annotations #17

Closed
harry9111985 opened this issue Jun 22, 2017 · 3 comments

Comments

@harry9111985
Copy link

harry9111985 commented Jun 22, 2017

@PostMapping
public ResponseEntity createProduct(** @requestbody @Valid ProductDetail product**) {
log.info("REST[createProduct] Rx[{}]", toStringHelper.asString(product));

    ProductDetail productDetail = productDetailService.create(product);

    log.info("REST[createProduct] Tx[{}]", toStringHelper.asString(productDetail));
    return new ResponseEntity<>(productDetail, HttpStatus.OK);
}

In the above code snippet , @requestbody and @Valid are two annotations given to ProductDetail parameter . If we run the cleanArch generate archetype task , we get the following error :

Failed to resolve variables in: 'C:\harish\projects\archetype\src\main\resources\templates\src\main\java_packagePath_\model\web\rest\ProductDetailRestRestController.java]
No such property: RequestBody for class: groovy.lang.Binding

@orctom : Can you suggest any solution / configuration for the same if we are missing something? . If its an outstanding issue , is there an ETA for the fix ?

orctom pushed a commit that referenced this issue Jun 22, 2017
@orctom
Copy link
Owner

orctom commented Jun 22, 2017

How's 1.4.5 doing?

@orctom
Copy link
Owner

orctom commented Jun 22, 2017

I probably should trying to fix it. As you can escape @ by @@, #14
1.4.5 might run into some other issue.
So, go either way, @@ or update version to 1.4.5.

@orctom orctom closed this as completed Jun 22, 2017
@idooo
Copy link

idooo commented Jun 22, 2017

@orctom just want to say - you are rockstar. Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants