grails

如何强制网站图标刷新?

时光总嘲笑我的痴心妄想 提交于 2020-08-08 15:40:57
问题: I have a Grails application running locally using its own tomcat and I have just changed the favicon for a new one. 我有一个Grails应用程序,它使用自己的tomcat在本地运行,而我刚刚将图标图标更改为一个新图标。 Problem is that I can not see it in any browser. 问题是我无法在任何浏览器中看到它。 The old favicon shows up or I get no favicon at all, but not my new one. 出现旧的收藏夹图标,或者我什么都没有得到,但是我的新收藏夹没有。 I do not think this is a Grails issue per se, more an issue with favicons. 我认为这本身不是Grails的问题,更多的是网站图标的问题。 What is supposed to happen with favicons? 网站图标应该发生什么? How are they supposed to work? 他们应该如何工作? I have numerous bookmarks in my browser which have the

Spring Enable***功能

懵懂的女人 提交于 2020-08-08 06:20:46
spring博大精深,衍生出了两大系列:spring boot 和sping cloud快速业务开发模式。 我们进行具体开发时,经常看到这样以Enable*开头的注解,如图 等等好多例子。。。框架自带的Enable* @EnableAspectJAutoProxy 开启对AspectJ自动代理的支持 @EnableAsync 开启异步方法的支持 @EnableScheduling 开启计划任务的支持 @EnableWebMvc 开启Web MVC的配置支持 @EnableConfigurationProperties 开启对 @ConfigurationProperties 注解配置Bean的支持 @EnableJpaRepositories 开启对SpringData JPA Repository的支持 @EnableTransactionManagement 开启注解式事务的支持 @EnableCaching 开启注解式的缓存支持 看到不少网文吹嘘的上天了、神乎其威,我只说一句话: 它(指Enable*)只是一种注解 ,可参考我的博文: Spring中@Import的三种情况 https://my.oschina.net/u/154866/blog/4290666 和 Spring Bean注册的几种方式 https://my.oschina.net/u/154866/blog

Grails GORM class with @GrailsCompileStatic annotation shows in the static mapping closure table, version, autoTimestamp as unresolved symbol

烈酒焚心 提交于 2020-07-15 09:26:46
问题 References: https://youtrack.jetbrains.com/issue/IDEA-206196 https://youtrack.jetbrains.com/issue/IDEA-207415?_ga=2.103698112.1724644326.1581075934-247190714.1566820331 package de.equeo.requestcode import grails.compiler.GrailsCompileStatic @GrailsCompileStatic class Feature { String name static mapping = { table 'rq_feature' version false autoTimestamp false } } This results in the error in the IDE only (works fine in grails run-app or while compiling): 回答1: Instead of doing that you can use

Grails session variable null

蓝咒 提交于 2020-06-29 10:16:32
问题 My app has an expensive service method, results of which must be 1) checked for errors and 2) presented to a Java applet via a URL (i.e. as opposed to a JavaScript variable). The method result is a string, and the applet is only capable of loading data from a file or URL. I tried to deal with the problem using a session variable: def action1 = { def input = params['input'] def result = expensiveServiceMethod( input ) def failed = result == null session['result'] = result render( view:'view1',

How to catch “org.springframework.web.multipart.MultipartException” in Grails 3

大兔子大兔子 提交于 2020-06-29 09:14:10
问题 I'm having an awfully hard time catching the error: org.springframework.web.multipart.MultipartException I have the following code: final class UploadTextCommand { MultipartFile contents static constraints = { } } Additionally to handle the post of the file I have this action: def upload = { UploadTextCommand -> ...code... } I've got these settings in the "application.yml" file to force the error: controllers: upload: maxFileSize: 100 maxRequestSize: 100 So I can reliably recreate the

Grails 2.4.0 legacy app throwing java.lang.reflect.InvocationTargetException

懵懂的女人 提交于 2020-06-29 05:12:50
问题 Since I have Java 1.8 in my local setup and need 1.7 for Grails, I installed jEnv. When I run grails command via jenv on my Grails project directory, I get this error - sandeepan.nath$ jenv exec grails objc[31865]: Class JavaLaunchHelper is implemented in both /Users/sandeepan.nath/.jenv/versions/1.7.0.80/bin/java (0x1003b74c0) and /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x1004724e0). One of the two will be used. Which one is undefined. |

Execution failed for task ':bootRun'. How do I resolve this issue for my grails app

白昼怎懂夜的黑 提交于 2020-06-28 05:34:30
问题 This is my first grails app. Here is my stacktrace: grails> run-app --stacktrace | Running application... <-------------> 0% CONFIGURING [0s] FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':bootRun'. > A problem occurred starting process 'command 'C:\Program Files\Java\jdk1.8.0_201\bin\java.exe'' * Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Exception is: org.gradle.api.tasks

Grails 3.2.0 Bootstrap.groovy script doesn't execute

我们两清 提交于 2020-06-27 17:11:18
问题 After i updated my project from Grails 3.1.11 to 3.2.0 the project has stopped working. When i start proj from IDE, it works fine. But when i pack it to jar and try to run in terminal, BootStrap.groovy does not execute. What is the problem? 回答1: I just found an issue on GitHub. Now BootStrap.groovy and UrlMappings.groovy should be in the default package Default package is indicated in application.yml grails: codegen: defaultPackage: com.example.app Migration docs has no information about this

Grails 4 WAR file confusion

十年热恋 提交于 2020-06-16 23:44:51
问题 I have a Grails application that I have upgraded from 3.3.0 to 4.0.3. In my build.gradle file I have the following war { archiveName 'Wolf.war' } In version 3, this would name my war file Wolf.war when running "grails war" just as expected. However, in Grails 4 this no longer works for me. I know this is related to Gradle. I have Gradle 5.1.1, and per the docs the archiveName property is deprecated (but should still work?). My question is, what is the proper way, in a Grails 4 app using

How do I unit test a Grails service that uses a converter?

陌路散爱 提交于 2020-06-09 10:59:46
问题 I have a Grails service that sends out e-mails using a 3rd-party service by doing a HTTP call: class EmailService { def sendEmail(values) { def valueJson = values as JSON ... // does HTTP call to 3rd party service } } I've written a unit test to test this service (because an integration test spins up Hibernate and the entire domain framework, which I don't need): @TestFor(EmailService) class EmailServiceTests { void testEmailServiceWorks() { def values = [test: 'test', test2: 'test2'] service