3

I am using the application.yml file to load runtime configurations for the grails-spring-security-rest plugin.

grails:
    profile: angularjs
    codegen:
        defaultPackage: telja
    spring:
        transactionManagement:
            proxies: false
    gorm:
        reactor:
            # Whether to translate GORM events into Reactor events
            # Disabled by default for performance reasons
            events: false
    plugin.springsecurity:
        conf:
          rest.token.storage.jwt.secret : 'xxxxxxxxxxxxxxxxxxxxxx'

However at startup I get this message

Configuring Spring Security REST 2.0.0.RC1... 2018-07-13 15:04:58.202 ERROR --- [ main] o.s.boot.SpringApplication : Application startup failed

java.lang.Exception: A JWT secret must be defined. Please provide a value for the config property: grails.plugin.springsecurity.conf.rest.token.storage.jwt.secret

2 Answers2

3

Found the solution, property should be declared as

plugin.springsecurity.rest.token.storage.jwt.secret

as opposed as what's in the logs

grails.plugin.springsecurity.conf.rest.token.storage.jwt.secret

0

You could create an application.groovy and a runtime.groovy in place of the yml. The external config plug-in has a script for converting from yml to Groovy config: http://plugins.grails.org/plugin/grails/external-config

virtualdogbert
  • 462
  • 3
  • 12