spring-roo

Creating a List<> Member with Spring Roo

狂风中的少年 提交于 2019-12-10 12:33:45
问题 The Spring Roo command field set creates a Set<> member. field set --fieldName --type How does one go about creating a List<> instead? 回答1: From the latest relese(1.2.4) onwards roo supports lists. field list --fieldname -- type 回答2: What is your persistence implementation? Are you using JPA or JDO? Hibernate (JPA provider) will technically "support" lists but makes no guarantee as to the order returned (maintaining order in a database doesn't come for free) and so you may as well use a Set.

How to Access third Party API (Like as: Facebook, Linkedin, Twitter) using Spring ROO

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 10:50:21
问题 I am trying to Access third party API like as: Facebook, Linkedin, Twitter using Spring ROO. Is it possible to do using Spring ROO? If it is possible, Please help me, how can i do this. Thanks Muni 回答1: If you are specifically targeting social networks integration, you can easily integrate Spring Social to your Spring Roo project. If you are looking more into third party API Integration, you can use Spring Integration within your Spring Roo project. Add the Spring Social or Spring Integration

Can we use multipart and @RequestBody together in spring..?

拈花ヽ惹草 提交于 2019-12-10 03:57:48
问题 I want to create a API which can have parameter as multipart file and JSON object (@RequestBody). Please find following snippet while calling this API I am getting 415 HTTP error. If I remove "@RequestBody LabPatientInfo reportData" then it works fine. @RequestMapping(value={"/lab/saveReport"}, method={RequestMethod.POST}, consumes={"multipart/form-data"}, headers={"Accept=application/json"}) @ResponseBody public ResponseEntity<String> saveReport(@RequestParam(value="reportFile")

STS Spring with Roo and Maven - too slow?

匆匆过客 提交于 2019-12-09 09:20:37
问题 I am using STS and Java since a while for developing a web application. The project is configured for using Maven, Roo and MySQL as database. I often find that I waste a lot of time in the following cases: No Roo response - when I modify a domain object Java class even if the Roo shell for the project is open and loaded it would not respond. My current hack to this issue is to generate a new finder for the class using roo (which awakens Roo somehow). Is there any better hack? Long times to

How can I provide my own @id field using Spring Roo and JPA

白昼怎懂夜的黑 提交于 2019-12-08 21:28:38
问题 I am trying to get Spring Roo to use my own @Id field instead of generating one. @Entity ... @RooEntity @Table(name = "usr") public class User { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "usr_id") private Integer id; ... public Integer getId() { return id; } public void setId(Integer id) { this.id = id } ... } Roo still creates the following in User_Roo_Entity.aj: @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "_id") private Long User._id; How can

How do you work in a team with spring roo?

久未见 提交于 2019-12-08 15:29:45
问题 I'm evaluating Spring-Roo to use in one of my projects but I'm not sure how can it work within a team. Everybody in the team can use the roo console? How do you commit your changes to svn? How do you manage merges and branching? Thanks! 回答1: I think here is what I would do: The "Architect Think Tank" in the team can create the basic bootstrap application once they have very hign level domain model carved out. This can then go into SVN. Followed by this team members can fire roo console either

Spring roo - adding CLOB field

為{幸葍}努か 提交于 2019-12-08 13:00:35
In my web application, I am saving some Text message in a COLUMN of a DB table(Oracle). Earlier the VARCHAR2 length(maximum length) is (500 BYTE). Now the maximum length is increased to 4000 characters. So I need to add a 'CLOB' field in my domain class. Can anyone please clarify what are the steps need to be followed in order to create a CLOB field in my domain class. I also have CLOB cloumn in my DB. (What is the command/syntax to start with?) Adding CLOB at database and adding the below code in the domain class is the solution. @Lob private String message; If you need to create a CLOB field

Spliting Front-end from Back-office on Maven

淺唱寂寞╮ 提交于 2019-12-08 09:01:42
问题 I've a java ecommerce web-based app. It is written using Spring Roo, so it follows the Domain Driven Design paradigm. The application has two UI. The first is front-end, based on plain jsp/jstl/tiles, it is stable, changes rarely and HAVE to STAY UP and RUNNING. The second is built on Vaadin/GWT, it changes frequently (on Custemer requerements). My question is how to best structure Maven project such as: Allow deploy (on tomcat) only back-office or front-end UI; Do not duplicate Domain Logic

How to create maven module for Spring Roo project?

≡放荡痞女 提交于 2019-12-08 08:15:47
问题 I have Spring Roo project. It is maven project. So I would like to use maven modules to make my growing project modular. However when I try to create module project( with m2eclipse right-click project, then Maven -> New Maven Module Project). It is created OK, it get's all maven dependencies/libraries from parent project. But: 1) I cannot use classes from parent project (even though "Resolve dependencies from Workspace projects" is checked) 2) I cannot use Roo shell. I can run shell, but

Spring roo - adding CLOB field

烈酒焚心 提交于 2019-12-08 06:24:03
问题 In my web application, I am saving some Text message in a COLUMN of a DB table(Oracle). Earlier the VARCHAR2 length(maximum length) is (500 BYTE). Now the maximum length is increased to 4000 characters. So I need to add a 'CLOB' field in my domain class. Can anyone please clarify what are the steps need to be followed in order to create a CLOB field in my domain class. I also have CLOB cloumn in my DB. (What is the command/syntax to start with?) 回答1: Adding CLOB at database and adding the