-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Spring-Boot integration #134
Comments
Could you tell us what you are missing. Basically I assumed that using the |
Minimal rules that will make my application work mostly ouf-of-box are:
1a)
3a) May be we should create
4a)
When all these will be packed into, let's say,
|
Interesting approach. I have a few question though:
|
@chkal usually there is no web.xml or web-fragment.xml in a Spring Boot application. Most of them will use an Embedded Tomcat (by default) or Jetty if Jetty is on the classpath. |
+1 |
Any contributions for improved Spring Boot support are more than welcome. I'm not very familiar with Spring Boot so any help there would be great. |
👍 |
I have two bits of sample code I'm working on:
Would either of these be helpful? I'm happy to contribute the code, and it's all public domain. |
I'm quite interested in this myself and have written custom Boot starters/autocofigurations already; I will have a look at this. |
@chkal would you be interested in a contributed togglz-boot module which acts as a starter and autoconfiguration for Spring boot. |
Of cause I'm interested in any kind of contribution for Spring Boot integration. Especially as I'm not very familiar with Spring Boot. I see there are many people looking forward to improved support for Spring Boot. If you need any help or if you would like to discuss the technical details before starting to code feel free to post on this thread. :) |
@chkal I'm setting up a sample project this week and are also discussing this with the Boot guys. |
@marceloverdijk IMHO it's better to name module |
@marceloverdijk Awesome. Thanks a lot. @php-coder +1 for BTW: I just wrote a few lines about how to contribute to Togglz: |
Yes indeed |
I have a - in progress - sample at https://github.com/marceloverdijk/spring-boot-togglz |
As I can see you've create the project that is the sample how to use Spring Boot with Togglz. Could you create a separate project just with this integration piece? In this case I could add it as the Maven dependency to my project. Also, why you're using |
@php-coder Yes this is the idea! Currently it's work in progress. |
@php-coder new location: https://github.com/marceloverdijk/togglz-spring-boot and the starter is now included in separate module. Still work in progress! |
@php-coder https://github.com/marceloverdijk/togglz-spring-boot is getting in good shape. |
@marceloverdijk How I can use it as Maven dependency? |
Hi Vyacheslav, Currently we don't have this in Maven as it's work in progress. Let me know if you need additional help. Hopefully in not to long time I will publish something to Maven central. On Tue, Jan 19, 2016 at 3:39 PM, Vyacheslav Semushin <
|
@php-coder I haven't managed to deploy a snapshot to maven. However you can build it easily locally for now. See "Building from Source" section at https://github.com/marceloverdijk/togglz-spring-boot. |
@marceloverdijk Ok, thanks! I will try to use https://jitpack.io/ for building the artifacts for Maven. Could you also add auto configuration for Thymeleaf Togglz Dialect? (https://github.com/heneke/thymeleaf-extras-togglz). Also I want to ask: before I used |
It fails with error: |
You have to update Togglz to 2.3.0-SNAPSHOT to use the Spring Boot integration. See this page for details on how to use the snapshots: |
@php-coder You can define your own |
I would like to remove my Togglz config completely. To do so I need to have ability to
|
|
@php-coder Both 1) and 2) are now implemented. See the README at the https://github.com/marceloverdijk/togglz-spring-boot with new configuration properties. Hope to have a look at 3) tomorrow. |
I've been noodling at this for a while. The main impediments at present:
I'm providing application settings like this:
|
I also have some extra working code to use a feature toggle annotation on controller endpoint hander methods, rather than on the entire controller class. |
@binkley please have a look at https://github.com/marceloverdijk/togglz-spring-boot it contains quite comprehensive support for Togglz autoconfiguration. Can you share some more details regarding you |
@binkley is you code public available? |
@marceloverdijk Right. It's licensed as Public Domain, but I haven't put it up in GitHub yet as I wanted to work out the issues I mentioned. Apologies. Let me see what I can do & post back when ready. A "not ready" but working scratch version is there. It's missing some of the key goals I want, but does demonstrate the approach we took for putting toggle annotations on controller endpoint methods: https://github.com/binkley/springy-boxy/tree/develop/src/main/java/hm/binkley/boxfuse Was also trying to reproduce in the small some of the issues we encountered in a large, non-public project in which we're using this approach. Essentially we're hooking into Spring MVC to ignore @RequestMapping methods in a controller whose toggle is disabled. Frankly, this is not a good area for Spring Framework. |
@marceloverdijk The approach above is working through Spring MVC. We're also spiking an approach with Spring AOP. It would not be quite as flexible, but more promising for lower impact on our internal project. Spring MVC & Boot have so many different extension points, our own codebase has tripped over itself with inconsistency among different teams. |
@binkley Are we having overlap with the Spring Boot integration? I also put a lot of effort in it and it is getting quite stable now. |
@marceloverdijk I'll definitely be looking yours over today. I hate to write code when I can reuse. :-) Also, happy to contribute if I have something not covered in your project. Thanks! |
@php-coder I just added the Thymeleaf Togglz dialect. |
BTW: just pushed a commit that changes the default Togglz admin console path to /togglz-console (was just /togglz). This to create Boot endpoint on /togglz to just display current feature sates. |
Added a Togglz actuator endpoint for viewing feature states over jmx/http to |
@marceloverdijk Thank you for the great work! It addresses most of my requirements, except one:
Is it possible that you will solve it? |
@php-coder I think almost every application has a DataSource but not all of them would use a JDBCStateRepository. E.g. personally I would use a file in most cases.
|
@chkal the Boot team tends to prefer to add the Togglz - Boot integration to a Togglz module. |
Sure, as I wrote before I would be happy to see the Spring Boot support as a Togglz module. So go ahead and prepare a pull request. Creating two modules is fine if it makes sense for the users. But I'm not sure if I understood the distinction between the two correctly. Could you explain this a bit more? |
OK I will work on a PR. |
PR #154 created. |
Ok, thanks for explaining. I also think that one module should be enough. I don't see a real benefit of splitting it into. I'm just wondering if we should name module |
|
No, I'm fine with this suffix. If it is a common Spring Boot naming convention, we should keep it. Thanks a lot for the PR. Unfortunately I'm currently very busy. But I hope I'll find some time to have a depper look at it tomorrow... |
OK no problem. I need to write the documentation anyway. |
And here is the PR for the documentation: togglz/togglz-site#4 |
Any timeline on release of 2.3.0? I'd like to get this feature into the hands of my teams. :-) |
I would love to get some more feedback if possible. Perhaps we could release 2.3.0.RC1 soon. As soon as the bits are in Maven Central, more people will probably try it. :) |
FYI: Togglz 2.3.0.RC1 has been released. This version ships with the new Spring Boot support by @marceloverdijk. Any kind of feedback is welcome. :) |
I think we can close this issue now. Boot support is now available since |
I'd like to have out-of-box integration with Spring Boot.
The text was updated successfully, but these errors were encountered: