spring-roo

Spring @Valid validator not invoked properly (Roo, Hibernate)

空扰寡人 提交于 2021-02-18 17:52:40
问题 I got a new roo project off the ground successfully, but now I'm having a problem getting validation to work for a login page. It seems that the validator is choking before passing control to my controller. I am never given the opportunity to check the BindingResult. I've examined several similar questions here and on the web, and my code seems to conform with what they are doing. First the error I get when submitting the form (if i pass validation i get no error message). In this case i didn

Problem installing Spring Roo in STS 4.6.1

你离开我真会死。 提交于 2021-02-11 14:48:15
问题 I've tried both STS 4.5.1 and STS 4.6.1, but unable to install the Spring IDE Roo Support Extension from the Nightly software site. Error Log shows this error: Spring IDE Roo Support 3.9.13.202004290816-CI-B2476 (org.springframework.ide.eclipse.roo.feature.feature.group 3.9.13.202004290816-CI-B2476) requires 'org.eclipse.equinox.p2.iu; org.eclipse.ajdt.feature.group 2.0.1' but it could not be found I'm running openJDK jdk8u181-b13 on Windows 10. Can anyone help with what needs to be done? 回答1

Maven Repositories for Spring Roo

≯℡__Kan透↙ 提交于 2021-02-09 11:59:06
问题 My intent is to proxy Roo Maven repository with my local Nexus installation, so that it will contain Roo 1.2.0.RELEASE packages. On http://static.springsource.org/spring-roo/reference/html/resources.html it is written that Roo builds are published on http://spring-roo-repository.springsource.org/release. Unfortunately that link returns error NoSuchKey . Is there some other Maven repository to get Roo packages from ? 回答1: Create (in Nexus) a proxy repository with the remote storage location =

How to make string primary key hibernate. @GeneratedValue strategies

ε祈祈猫儿з 提交于 2020-01-19 12:55:29
问题 My goal is to create an entity Device that has a unique field IMEI and I would like to use it as a primary key, and specify it at device registration time (manually specified, while creating the entity). I use Spring roo tool for development and hibernate as ORM. When I specify this in Entity declaration: @RooJavaBean @RooToString @RooJpaActiveRecord(identifierField = "IMEI", identifierType = String.class) public class Device {...} I get this generated: @Id @GeneratedValue(strategy =

SpringRoo 2.0.RC1 - How can i use date Calenderfields in entityFormatExpression and got correct format

删除回忆录丶 提交于 2020-01-17 07:04:11
问题 date Calendar When i use date Calender field in entityFormatExpression i got a entity jpa --class ~.domain.Pet --sequenceName PET_SEQ --entityFormatExpression "#{name} (#{type}) birthDay: #{birthDay}" field date --fieldName birthDay --type java.util.Calendar --notNull --dateTimeFormatPattern "dd.MM.yyyy" Log Warning 2017-03-22 10:43:55.738 WARN - QP: - 6424 --- [io-8082-exec-10] .w.s.m.s.DefaultHandlerExceptionRes olver : Failed to write HTTP message: org.springframework.http.converter

SpringRoo 2.0.RC1 - How can i use date Calenderfields in entityFormatExpression and got correct format

a 夏天 提交于 2020-01-17 07:03:27
问题 date Calendar When i use date Calender field in entityFormatExpression i got a entity jpa --class ~.domain.Pet --sequenceName PET_SEQ --entityFormatExpression "#{name} (#{type}) birthDay: #{birthDay}" field date --fieldName birthDay --type java.util.Calendar --notNull --dateTimeFormatPattern "dd.MM.yyyy" Log Warning 2017-03-22 10:43:55.738 WARN - QP: - 6424 --- [io-8082-exec-10] .w.s.m.s.DefaultHandlerExceptionRes olver : Failed to write HTTP message: org.springframework.http.converter

Accessing Roo Identifier

那年仲夏 提交于 2020-01-17 03:03:25
问题 I have this entity class having more than one primary key ( @Id ) which resulted me to use @RooJpaActiveRecord(identifierType = '<IdentifierClass.class>') and @RooIdentifier(dbManaged=true) . Yet I am having a problem on accessing Identifier.class from the entity class itself. My questions is how can I access Identifier in the entity class without, at most, removing the @RooJpaActiveRecord(identifierType = '<Identifier.class>') code. 回答1: Roo will generate a property id on your entity. This

How to use Spring ROO with a maven multi-module project?

♀尐吖头ヾ 提交于 2020-01-16 06:58:26
问题 I'm trying to use Spring Roo (1.2.4) with a maven multi-module project and having a lot of difficulties. My entities are declared in one module and the webapp in another. Obviously the webapp has the entities module listed as a dependency. However, whenever I open the ROO shell in the webapp, I cannot generate any of the Roo Aspects for any @Roo annotated type. For example, @RooService(domainTypes = { com.ia.domain.User.class }) has no impact unless my webapp project contains the com.ia

JSR-303 and Spring MVC Binding Result

血红的双手。 提交于 2020-01-16 04:09:12
问题 I'm trying to figure out how to get localized error messages when a validation error occurs. My domain object looks like this: @RooJavaBean @RooToString @RooEntity public class Lead { @Email(message = "{email_error_message}") String emailAddress; } My Controller looks like this: @RequestMapping(method=RequestMethod.POST) public @ResponseBody String create(@Valid Lead lead, BindingResult result) { log.debug("In POST!"); if(result.hasErrors()) { FieldError fieldError = result.getFieldError(

How can I make sure that aspects generated by Spring roo are woven by a dependent project?

最后都变了- 提交于 2020-01-13 19:13:08
问题 I have a Spring Roo multi module project . I noticed that after including the jar/module containing my domain model in another project, the aspects had not been woven leaving me with domain classes without any usable getters/setters . How can I make sure that aspects generated by Spring roo are woven by the dependent project? EDIT : In order to be able to use Roo's aspects from another project, one needs to include the aspectJ plugin in the dependent project. Note that compile time loading is