spring-roo

Spring MVC ResourceBundleMessageSource XML configuration

两盒软妹~` 提交于 2019-12-13 01:37:57
问题 I would like to mimic the Grails way of resolving i18n messages. In WEB-INF/i18n/ I have the following directories: admin /messages_EN.properties admin /messages_FR.properties website /messages_EN.properties website /messages_FR.properties please ignore the language endings ( EN and FR ) in this example in my xml configuration I currently have: <!-- Register the welcome.properties --> <bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">

Queuing schedular tasks

半城伤御伤魂 提交于 2019-12-13 00:22:38
问题 I'm a project using Spring Roo. I have implemented a scheduler feature on my project following the tutorial about Spring Task Scheduler. I was planning to add another scheduler but the new scheduler should run at the end of the first scheduler. There's one obvious way for this, to trigger the scheduler method as the last statement of the first scheduler. But that approach would make the first scheduler class dependent on the second scheduler class. Is there a way to queue two or more

Spring roo - how to install spring surf

混江龙づ霸主 提交于 2019-12-12 19:21:26
问题 could please anybody help me to install spring surf ? According to this video, there should be command "roo>install surf" or roo>addon install surf" but the install command doesn't exist If I go "addon install bundle --bundleSymbolicName" and let the content assist list the add-ons available, it is not there Also this site says to download org.springframework.roo.addon.alfresco.surf-1.0.0.RC3.jar and put it into $ROO_HOME/dist directory (which is btw not there). I created dist dir, restarted

My Spring application leaks database connections whereas I use the default Roo configuration

心已入冬 提交于 2019-12-12 09:20:05
问题 I am encountering an serious issue with my application. It leaks database connections whereas I use the default Spring Roo datasource configuration as follows: <bean class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" id="dataSource"> <property name="driverClassName" value="${database.driverClassName}" /> <property name="url" value="${database.url}" /> <property name="username" value="${database.username}" /> <property name="password" value="${database.password}" />

Spring Roo 2.0.RC1: use Mysql DB with springlets authentification

泄露秘密 提交于 2019-12-12 05:13:43
问题 When is use Spring Roo with mysql and use security setup --provider SPRINGLETS_JPA When i now start the application i get error Stacktrace 2017-03-28 10:00:57.695 WARN 7544 --- [ restartedMain] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot

Spring roo - add JSON

纵然是瞬间 提交于 2019-12-12 04:16:22
问题 I'm trying to learn Spring Roo. One of the thing I wanted to try is what web mvc json setup is doing, but I'm getting message: Command 'web mvc json setup' was found but is not currently available (type 'help' then ENTER to learn about this command) which is not helping at all. I found nothing in docs. Steps I did in console C:\Betlista\tmp>mkdir RooJSONTest C:\Betlista\tmp>cd RooJSONTest C:\Betlista\tmp\RooJSONTest>roo ____ ____ ____ / __ \/ __ \/ __ \ / /_/ / / / / / / / / _, _/ /_/ / /_/ /

SpringRoo placing <script> and <link> on load-scripts.tagx from view.xml

丶灬走出姿态 提交于 2019-12-12 03:54:50
问题 A best practice of web development is to place the <styles> and <scripts> on a particular page in .css and .js file respectively. This question might be a duplicate from this question and the answer from @java1337 get it working. From his answer file management can be an issue since for every definition of a view (.jspx) it is required to add another .jspx file containing all <link href> and <scripts src> . One possible solution I'm working on is adding in the view.xml the URL/link of all

Spring MVC Controller Return JSON - Error 406

百般思念 提交于 2019-12-12 03:35:31
问题 After searching all the related links in StackOverflow for the given title I am posting this question. My Controller code is: @RequestMapping(value="/user/update", method = RequestMethod.GET, headers="Accept=*/*") public @ResponseBody List<Users> getContentSummaryData(@RequestParam String user, @RequestParam String userid){ return Users.findAllUsers(); } And My jquery request is as follows: $.getJSON("user/update", { user: "user", userid:"1230" }, function(data){ console.log(data); }); But as

Roo 1.1.5 super basic application is buggy

落爺英雄遲暮 提交于 2019-12-12 03:04:38
问题 I'm using Roo 1.1.5, with Eclipse STS, here is what I do: I create a new Spring Roo Project from Eclipse, and in the Roo Shell, I type the following: persistence setup --provider DATANUCLEUS --database H2_IN_MEMORY entity --class ~.domain.Task field string --fieldName description --notNull --sizeMin 3 --sizeMax 512 field boolean --fieldName completed --notNull controller all --package ~.controller A more verbose description is in my blog, but what reported above is basically what I do. In a

Custom label for a SELECT in Spring Roo

折月煮酒 提交于 2019-12-12 01:36:06
问题 I am starting with Spring Roo. In my project, I have to entities with a one-to-many relation. In my controller, when I edit one entity, I get an HTML SELECT to choose one of the other entity. I'd like to have a custom label in this SELECT. I tried to register a Converter in my ApplicationConversionServiceFactoryBean : public class ApplicationConversionServiceFactoryBean extends FormattingConversionServiceFactoryBean { @Override protected void installFormatters(FormatterRegistry registry) {