forked from tranSMART-Foundation/transmart-rest-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TransmartRestApiGrailsPlugin.groovy
49 lines (42 loc) · 1.73 KB
/
TransmartRestApiGrailsPlugin.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import org.springframework.aop.scope.ScopedProxyFactoryBean
import org.springframework.stereotype.Component
import org.transmartproject.rest.marshallers.MarshallersRegistrar
import org.transmartproject.rest.marshallers.TransmartRendererRegistry
class TransmartRestApiGrailsPlugin {
def version = '18.1-SNAPSHOT'
def grailsVersion = '2.3 > *'
def title = 'Transmart Rest Api Plugin'
def author = 'Transmart Foundation'
def authorEmail = '[email protected]'
def description = 'Adds rest api to transmart application'
def documentation = 'https://wiki.thehyve.nl/'
def license = 'GPL3'
def organization = [name: 'The Hyve', url: 'http://www.thehyve.nl/']
def developers = [
[name: 'Ruslan Forostianov', email: '[email protected]'],
[name: 'Jan Kanis', email: '[email protected]'],
[name: 'Burt Beckwith', email: '[email protected]']
]
def issueManagement = [system: 'JIRA', url: 'https://jira.thehyve.nl/browse/CHERKASY']
def scm = [url: 'https://fisheye.ctmmtrait.nl/browse/transmart_rest_api']
def doWithSpring = {
xmlns context: 'http://www.springframework.org/schema/context'
context.'component-scan'('base-package': 'org.transmartproject.rest') {
context.'include-filter'(type: 'annotation', expression: Component.canonicalName)
}
studyLoadingServiceProxy(ScopedProxyFactoryBean) {
targetBeanName = 'studyLoadingService'
}
marshallersRegistrar(MarshallersRegistrar) {
packageName = 'org.transmartproject.rest.marshallers'
}
// override bean
rendererRegistry(TransmartRendererRegistry) {
modelSuffix = application.config.grails.scaffolding.templates.domainSuffix ?: ''
}
}
def doWithApplicationContext = { ctx ->
// Force the bean being initialized
ctx.getBean 'marshallersRegistrar'
}
}