grails

Multipart file upload - maxFileSize exceeded

狂风中的少年 提交于 2020-05-28 07:26:29
问题 I try to upload a file with a size greater than 128kb but I always get (Grails 4) org.apache.tomcat.util.http.fileupload.impl.SizeLimitExceededException: the request was rejected because its size (1474589) exceeds the configured maximum (128000) I already tried: my application.yml: controllers: defaultScope: singleton upload: maxFileSize: 26214400 maxRequestSize: 26214400‬ My CustomMultipartResolver: class CustomMultipartResolver extends StandardServletMultipartResolver { static final String

Grails: domain object sort mapping not working

♀尐吖头ヾ 提交于 2020-05-16 21:58:33
问题 Here is my domain object: package org.olr.nonadmin import org.olr.admin.User class Question { // Integer id // autogenerated by db // Integer version // autogenerated integer Date dateCreated // auto filled Date lastUpdated // auto filled String qText // question text - can contain markup! String aText // answer text - can contain markup! boolean publik // public to all usersot needed String figureBase64 // image in BASE64 format, used in data-URI for figure String figureName // figure name

How to get deserialized JTS Geometry field in Grails 4?

爷,独闯天下 提交于 2020-05-13 19:58:51
问题 I'm building a small Geo server using PostgreSQL + PostGIS + Grails 4 + Geoserver + React + JTS. The domain class has a com.vividsolutions.jts.geom.Point field that is maped to a sqlType: 'geometry(Point,4326)' . When I search any findBy...(...) search, I cannot get the result, as it is not posible deserialize in Grails 2.x I did not get this problem. It's my first time programming in Grails in 3 years. package .... import com.vividsolutions.jts.geom.Point class Aqop { String pid String pname

Maven配置aliyun镜像仓库

≡放荡痞女 提交于 2020-05-01 18:35:05
$MAVEN_HOME/conf/settings.xml mirrors标签中添加mirror如下: <mirrors> <mirror> <id>aliyun-public</id> <mirrorOf>*</mirrorOf> <name>aliyun public</name> <url>https://maven.aliyun.com/repository/public</url> </mirror> <mirror> <id>aliyun-central</id> <mirrorOf>*</mirrorOf> <name>aliyun central</name> <url>https://maven.aliyun.com/repository/central</url> </mirror> <mirror> <id>aliyun-spring</id> <mirrorOf>*</mirrorOf> <name>aliyun spring</name> <url>https://maven.aliyun.com/repository/spring</url> </mirror> <mirror> <id>aliyun-spring-plugin</id> <mirrorOf>*</mirrorOf> <name>aliyun spring-plugin</name>

maven配置

爷,独闯天下 提交于 2020-04-21 02:31:47
配置Maven环境 配置Maven环境变量 MAVEN_HOME : D:\server\maven\apache-maven-3.6.3 PATH : %MAVEN_HOME%\bin 查看版本信息:mvn -v https://repo1.maven.org/maven2 配置 \apache-maven-3.6.3\settings.xml文件 <?xml version="1.0" encoding="UTF-8"?> <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <localRepository>D:\Repository</localRepository> <pluginGroups> </pluginGroups> <proxies> </proxies> <servers> </servers> <!--拷贝mirrors节点下的全部内容--> <mirrors> <mirror>

How can I track a button click from a different UI?

 ̄綄美尐妖づ 提交于 2020-04-18 05:47:53
问题 I'm sorry if this question isn't framed the way it should, I have trouble wording out my problem. Is it possible to see which button the user clicked, if the button was on a different UI? I have a GSP page that is displaying a Jenkins Blue Ocean to monitor a pipeline. I want to track if the user has pressed any pause or abort buttons, but because the Jenkins Blue Ocean isn't part of my page, I can't send anything to my controller. Would there be any work arounds or methods to track something

Grails 技巧

流过昼夜 提交于 2020-04-15 09:56:20
【推荐阅读】微服务还能火多久?>>> 1.不生成 version 字段 static mapping = { version false } 2.分页结果集列表 PagedResultList,非常适合分页查询 def c = Account.createCriteria() def results = c.list (max: 50, offset: 10) { like("holderFirstName", "Fred%") and { between("balance", 500, 1000) eq("branch", "London") } order("holderLastName", "desc") } println "Rendering ${results.size()} Accounts of ${results.totalCount}" results.size() 为返回的 list 记录大小,上面为offset为10的50条记录 results.totalCount 为符合条件记录在数据库大小 3.使用proxy() 方法获取关联Domain class Book{ Author author } def author=Author.proxy(1) //不会到数据去查询实际数据 Book.findByAuthor(author) author只是补助作用

Grails watch files doesn't work inside Docker container running inside a Vagrant virtual machine

北战南征 提交于 2020-04-13 05:52:47
问题 I have a fairly nested structure: MacOSX workstation running a... Vagrant VirtualBox virtual machine with ubuntu/trusty64 running a... Docker container running... my application written in Grails Every layer is configured in such a way as to share a portion of the file system from the layer above. This way: Vagrant, with config.vm.synced_folder directive in Vagrantfile Docker, with the -v command like switch and VOLUME directive in the Dockerfile This way I can do development on my

2020年九大Java开发框架都有什么?

早过忘川 提交于 2020-04-10 09:41:22
2020年九大java开发框架,小编主要介绍Spring框架、Hibernate框架、Struts框架、Play框架、GoogleWebToolkit框架、Grails框架、Blade框架、JavaServerFaces框架、Vaadin框架九大框架,希望您可以多java框架有更多的认识。 一、Spring框架   Spring框架框架排名首位,具有开发复杂Web应用程序的出色能力,这些应用程序因性能突出而广受赞誉。使Java开发人员能够轻松地创建企业级应用程序。Web应用程序开发人员可以证明Spring框架的能力。是Spring成为Java开发人员最爱的原因。 在开发人员的选择中,SpringMVC和SpringBoot远远领先于其他Java技术。对于开发人员来说,这里的一大优势是他们可以不受其他模块约束而专注于一个模块,因为Spring利用了控制反转(IoC)。其他优点是一个全面的配置模型,支持传统数据库和现代数据库(如NoSQL),并通过支持面向方面编程来支持内聚开发。提供一些模块如SpringMVC、SpringCore、SpringBoot、SpringTransaction等。 二、Hibernate框架   作为一个对象关系映射(ORM)数据库,改变了我们以前查看数据库的方式。尽管不是一个全栈框架,但可以极其轻松地为多个数据库转换数据。支持多个数据库的能力使很容易扩展

Increase timeout for gradle to get a maven dependency

你说的曾经没有我的故事 提交于 2020-04-07 14:49:57
问题 I am tring to get a jar dependency from Maven via the grails 3.1.5 gradle dependency Resolution . How do I increase timeout that gradle takes to get a maven dependency. Sure I have seen that the dependency takes quiet a longer time to be downloaded. But how can I configure gradle to wait longer in order to download the dependency 回答1: The feature was added in Gradle here: https://github.com/gradle/gradle/pull/3041 You can increase the timeout with 2 properties: ./gradlew build -Dhttp