Spring Cloud config with togglz - spring

I've configured an application with togglz, with the application.properties externalized in a Spring Boot Config server. When I update a feature status on application.properties in the server and make a call to /actuator/refresh they return the feature changes, but the application doesn't change the status of the feature. If I restart the application the status changes.
Does anyone know if it is possible disable a feature without restart application, and didn't use togglz console?
thanks

Disable a feature in a database. If you are using default values: table "togglz" column "feature_enabled"

Related

how to look at default configuration used for connecting to DB

Since SpringBoot is opinionated, it connects to my Oracle DB using configuration that I didn't have to do. Now, I want to see these config values, how can I do that?
I tried the "env" and "info" actuator endpoints, but they didn't have any information on this
TIA
In your app if you already exposed all actuator endpoints or specific configprops endpoint, you can use "configprops".
<host>/actuator/configprops
Other than the jdbc connection url is there any configuration you specificly wanted to see? perhaps you can try to look at the logging information but it will show a lot more than just configuration values, but if you try to find list of configuration that Spring Boot set here is the reference link

default http threadpool size in embedded tomcat server spring boot

I have a spring boot application which is running on embedded tomcat server. I want to know the default tomcat http threadpool size and how to check them.
After checking on various portal i got to know that we can add 'server.tomcat.max-threads' in the applications.properties file and control it.
But i want to understand what is the default size and how to find it.
You can find the default value for each property here for the latest Spring Boot version. In this case the property is server.tomcat.threads.max and the default value is Tomcat's default, which is 200.

how to use spring admin in my existing spring boot project?

I wanted to monitor my web application deployed in the production environment, monitoring tool notify me when the server down or any abnormal cases for that I decided to use spring admin, plz help to find the best resource for set upping spring admin with the spring boot project (correctly I'm using java melody for monitoring purpose, but I does not allow email notification)

Log action in Spring Boot Admin

How to configure Spring Boot Admin to log action. For example, I want Spring Boot Admin log action when someone change log level form INFO to DEBUG or when someone change configuration value in JMX tab and write wrong configure override the existing.
Do Spring Boot Admin has a feature to do that?
No it doesn't but you could write a zuul filter intercepting, analyzing the request to /api/applications/{id}/logfile and writing a log statement.
Spring Boot includes a number of additional features to help you
monitor and manage your application when it’s pushed to production.
You can choose to manage and monitor your application using HTTP
endpoints, with JMX or even by remote shell (SSH or Telnet). Auditing,
health and metrics gathering can be automatically applied to your
application.
Actuator HTTP endpoints are only available with a Spring MVC-based
application. In particular, it will not work with Jersey unless you
enable Spring MVC as well.
You can also activate a listener by invoking the SpringApplication.addListeners(…​) method and passing the appropriate Writer object. This method also allows you to customize the file name and path via the Writer constructor.
Customize your requirement in Actuator
https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#production-ready
Maven :
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
    <version>1.5.2.RELEASE</version>
</dependency>
http://www.baeldung.com/spring-boot-authentication-audit

Spring cloud config client without Eureka, Ribbon and spring boot

I have spring web application (not spring boot) running in AWS. I am trying to create centralized configuration server. How to refresh the spring-cloud-client after the changing the properties? As per tutorial
Actuator endpoint by sending an empty HTTP POST to the client’s refresh endpoint, http://localhost:8080/refresh, and then confirm it worked by reviewing the http://localhost:8080/message endpoint.
But my aws Ec2 instances are behind the loadbalancer so i can't invoke the client url. I didn't understand the netflix Eureka and Ribbon much but it seems like adding another level of load balancer in the client side. I don't like this approach. Just to change a property i don't want to make the existing project unnecessarily complex. Is there any other way? or Am I misunderstood Eureka/Ribbon usage?
I have looked at the spring-cloud-config-client-without-spring-boot, spring-cloud-config-client-without-auto-configuration none of them have answer. First thread was answered in 2015. Wondering is there any update?
To get the configuration properties from a config server. You can do a http request. Example:
From the documentation we can see:
/{application}/{profile}[/{label}]
/{application}-{profile}.yml <- example
/{label}/{application}-{profile}.yml
/{application}-{profile}.properties
/{label}/{application}-{profile}.properties
So if you would do a request to http://localhost:8080/applicationName-activeProfile.yml you would receive the properties in .yml format for the application with that name and active profile. Spring boot config clients would automatically provide these values but you will have to provide em manually.
You don't need Eureka/Ribbon for this to work, it's a separate component.
More info: http://cloud.spring.io/spring-cloud-static/spring-cloud.html#_spring_cloud_config
Maybe you could even use spring-cloud-config but I'm not sure what extra configuration is needed without spring-boot.
https://cloud.spring.io/spring-cloud-config/

Resources