Skip to content

Commit

Permalink
Refactor app and plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
rainboyan committed May 7, 2024
1 parent 9cb055d commit 921f971
Show file tree
Hide file tree
Showing 13 changed files with 354 additions and 117 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ jobs:
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up JDK 11
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 11
java-version: 8
- name: Generate secring file
env:
SECRING_FILE: ${{ secrets.SECRING_FILE }}
Expand All @@ -76,4 +76,4 @@ jobs:
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
SECRING_FILE: ${{ secrets.SECRING_FILE }}
with:
arguments: -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg publishToSonatype closeAndReleaseSonatypeStagingRepository
arguments: -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg :plugin:publishToSonatype closeAndReleaseSonatypeStagingRepository
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['11']
java: ['8']
env:
GIT_USER_NAME: rainboyan
GIT_USER_EMAIL: [email protected]
Expand Down Expand Up @@ -73,4 +73,4 @@ jobs:
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
SECRING_FILE: ${{ secrets.SECRING_FILE }}
with:
arguments: -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg publishToSonatype closeAndReleaseSonatypeStagingRepository
arguments: -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg :plugin:publishToSonatype closeAndReleaseSonatypeStagingRepository
103 changes: 101 additions & 2 deletions app/conf/application.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
grails:
profile: web-plugin
profile: web
codegen:
defaultPackage: org.graceframework.plugin
defaultPackage: grace.demos
gorm:
reactor:
# Whether to translate GORM events into Reactor events
Expand Down Expand Up @@ -42,3 +43,101 @@ environments:
management:
endpoints:
enabled-by-default: false

---
grails:
mime:
disable:
accept:
header:
userAgents:
- Gecko
- WebKit
- Presto
- Trident
types:
all: '*/*'
atom: application/atom+xml
css: text/css
csv: text/csv
form: application/x-www-form-urlencoded
html:
- text/html
- application/xhtml+xml
js: text/javascript
json:
- application/json
- text/json
multipartForm: multipart/form-data
pdf: application/pdf
rss: application/rss+xml
text: text/plain
hal:
- application/hal+json
- application/hal+xml
xml:
- text/xml
- application/xml
urlmapping:
cache:
maxsize: 1000
controllers:
defaultScope: singleton
converters:
encoding: UTF-8
views:
default:
codec: html
gsp:
encoding: UTF-8
htmlcodec: xml
codecs:
expression: html
scriptlet: html
taglib: none
staticparts: none

---
hibernate:
cache:
queries: false
use_second_level_cache: false
use_query_cache: false
dataSource:
pooled: true
jmxExport: true
driverClassName: org.h2.Driver
username: sa
password: ''

environments:
development:
dataSource:
dbCreate: create-drop
url: jdbc:h2:mem:devDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
test:
dataSource:
dbCreate: update
url: jdbc:h2:mem:testDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
production:
dataSource:
dbCreate: none
url: jdbc:h2:./prodDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
properties:
jmxEnabled: true
initialSize: 5
maxActive: 50
minIdle: 5
maxIdle: 25
maxWait: 10000
maxAge: 600000
timeBetweenEvictionRunsMillis: 5000
minEvictableIdleTimeMillis: 60000
validationQuery: SELECT 1
validationQueryTimeout: 3
validationInterval: 15000
testOnBorrow: true
testWhileIdle: true
testOnReturn: false
jdbcInterceptors: ConnectionState
defaultTransactionIsolation: 2 # TRANSACTION_READ_COMMITTED
3 changes: 2 additions & 1 deletion app/conf/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
<appender-ref ref="STDOUT" />
</root>
<logger name="org.hibernate.orm.deprecation" level="error" />
<logger name="org.graceframework.plugin.Application" level="debug" />
<logger name="org.grails.plugins.support" level="debug" />
<logger name="grace.demos.Application" level="debug" />
</configuration>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.graceframework.plugin
package grace.demos

import grails.boot.Grails
import grails.plugins.metadata.PluginSource
import groovy.transform.CompileStatic

@PluginSource
@CompileStatic
class Application {

static void main(String[] args) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.graceframework.plugin
package grace.demos

class BootStrap {

Expand Down
Loading

0 comments on commit 921f971

Please sign in to comment.