黄色视频

    1. <form id=QUkGStDXb><nobr id=QUkGStDXb></nobr></form>
      <address id=QUkGStDXb><nobr id=QUkGStDXb><nobr id=QUkGStDXb></nobr></nobr></address>

      Show Navigation

      spring-session

      This plugin provides spring-session support in grails application.

      Owner: jeetmp3 | 2.0.0-RC1 | Mar 31, 2016 | Package | Issues | Source | License: Apache-2.0

      15
      
      dependencies {
          compile 'org.grails.plugins:spring-session:2.0.0-RC1'
      }
      
                  

      Grails 3

      The 2.X version of the plugin is compatible only with grails 3.

      Grails 2.x Documentation

      spring-session-grails-plugin

      This plugin provides spring-session support in grails application. SpringSession provides nice features:

      • HttpSession
        • Clustered Sessions
        • Multiple Browser Sessions
        • RESTful APIs
      • WebSocket

      SpringSession uses Redis to persist the HTTP Sessions. You can find official documentation for Spring Session project here: http://docs.spring.io/spring-session/docs/1.0.1.RELEASE/reference/html5/

      Currently this plugin provides support for HttpSession only. WebSocket support will be added in further release.

      Using

      Just add a plugin in BuildConfig.groovy.

      plugins {
          runtime ":spring-session:1.2"
          ...
      }
      

      Note: Redis must be installed on your machine.

      Configuration

      1. Redis Configuration

      Default configuration will lookup Redis server on your localhost port 6379. To override default configuration add below code in Config.groovy

      springsession.redis.connectionFactory.hostName = "<redis server ip>"
      springsession.redis.connectionFactory.port = 6379
      springsession.redis.connectionFactory.password = "<password>"
      springsession.redis.connectionFactory.timeout = 2000
      springsession.redis.connectionFactory.usePool = true
      springsession.redis.connectionFactory.dbIndex = 0
      

      2. Change Session Strategy Configuration

      Default session strategy is Cookie based and session cookie name is SESSION You can override the default session strategy

      springsession.strategy.defaultStrategy='HEADER'
      

      This will enable HTTP Header based session strategy. Default token name is x-auth-token you can override this

      springsession.strategy.token.headerName = "new token name"
      

      To change default cookie name add below configuration.

      springsession.strategy.cookie.name="Your Cookie name"
      

      (Note: Property ~~springsession.strategy.defaultStrategy.cookie.name~~ is no longer available in version 1.1 and higher)

      3. Configure redis sentinel

      springsession.redis.sentinel.master="<Sentinel master name>"
      springsession.redis.sentinel.nodes=[[host: "hostname", port: xxxx], [host: "another host", port: xxxx]]
      springsession.redis.sentinel.password="Sentinel password"
      

      4. Enable update mutable objects in session

      By default spring session doesn't update mutable object value stored in session. You can override this behaviour by setting below property to true. By default this value is false.

      springsession.allow.persist.mutable = true
      

      Version Support

      • Grails 2.4 +
      • Redis 2.8 +
      HoMEmenuCopyrights 2015.All rights reserved.More welcome - Collect from power by english Blok number sss85786789633111 Copyright