-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Thymeleaf Date Dialect Bean in ThymeleafAutoConfiguration #1120
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
Conversation
@@ -148,6 +150,17 @@ public LayoutDialect layoutDialect() { | |||
} | |||
|
|||
@Configuration | |||
@ConditionalOnClass(name = "com.github.mxab.thymeleaf.extras.dataattribute.dialect.DataAttributeDialect") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can use value= here (and the class literal)
Thanks! I added a small comment on one line. We have to decide if it's OK to add a new dependency in 1.1.* or if it's better to wait till 1.2. Probably @wilkinsona will have the key opinion and he's on PTO at the moment. |
Hey thanks, I thought also that the class makes more sense at that point, but the ThymeleafWebLayoutConfiguration had it also via the name=".." attribute so I thought I make it analog to that. One more issue I have is if I should use @ConditionalOnMissingBean(DataAttributeDialect.class) since application that have already declared a DataAttributeDialect bean would have two then? (i.e. sagan) |
I think value= is OK at the type level, so I assume
|
added data dialect usage to spring-boot-sample-web-ui project
I changed it to the class literal, further I included it in the thymeleaf starter dependencies and extended the spring-boot-sample-web-ui example project by some simple data dialect usage |
I'd prefer that we wait for 1.2 |
Daniel Fernandez (Thymeleaf lead) has some concerns about this dialect, so I'm not sure we want it to be part of the starter. I know it is in use in Sagan, so I have no problem with including autoconfiguration, but maybe you should contact Daniel and discuss his concerns anyway (I'd be happy to set that up if I knew your email address). |
I thought already that I went to far by including it in the starter :) I'll remove it. I have Daniels email address and will contact him. |
This reverts commit 9de7eb7.
Conflicts: spring-boot-dependencies/pom.xml
Ok I reverted the last commit |
Master's building 1.2 now so we can start thinking about merging this. @mxab have you signed the CLA? |
yep signed it |
Squashed and merged. Thanks for the contribution, @mxab. |
Hi I added the DataAttributeDialect to ThymeleafAutoConfiguration