togglz.features-file not reflecting in console

87 views
Skip to first unread message

Naveen K

unread,
Sep 5, 2018, 10:50:41 PM9/5/18
to togglz-users
I am trying to get property file based togglz working. 

Created properties file referring this page https://www.togglz.org/documentation/spring-boot-starter.html

features.properties
----------------------------

FEATURE1_FILTER=true
FEATURE2_FILTER=true

application.properties  
-----------------------------

togglz.features-file = file:./features.properties



But, togglz console not showing these properties. Am I missing anything?. Also, how to define togglz group in properties file I dont see it in the above link. Thanks in advance. 

Christian Kaltepoth

unread,
Sep 6, 2018, 12:51:30 PM9/6/18
to togglz...@googlegroups.com
You could try an absolute path instead. Maybe the relative path is pointing to the wrong location?
--

Naveen Kumar Kondaparthy

unread,
Sep 6, 2018, 1:43:39 PM9/6/18
to togglz...@googlegroups.com
I tried both absolute and relative paths.  
My understanding is,  if I add togglz.feature-file in application.properties I don't need to override getStateRepositoy with FileBasedStateRepository. Please confirm. 
Please take a look at the the files below.

My application.properties
------------------------------------
togglz.features-file=file:./features.properties
togglz.features-file-min-check-interval=10

# Togglz admin configuration
togglz.console.use-management-port: false
togglz.console.enabled=true
togglz.console.secured=false
togglz.console.path=/togglz-console


features.properties in the same directory
------------------------------------------------------

FEATURE1_FILTER=true
FEATURE2_FILTER=true

Christian Kaltepoth

unread,
Sep 6, 2018, 11:44:09 PM9/6/18
to togglz...@googlegroups.com
Perhaps somebody more familiar with the Spring Boot integration can help?

However, after having a quick look at the TogglzAutoConfiguration class, I guess you still need to either reference a feature enum or list the features in application.properties.
Reply all
Reply to author
Forward
0 new messages