Skip to content
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

#134 Add Spring-Boot integration #154

Merged
merged 1 commit into from Feb 12, 2016
Merged

#134 Add Spring-Boot integration #154

merged 1 commit into from Feb 12, 2016

Conversation

marceloverdijk
Copy link

Here is the Spring Boot integration code.

We need to give some special attention to spring-boot-starter/template.mf:

..
Import-Template:
 com.github.heneke.thymeleaf.togglz.*;version="0",
 javax.servlet.*;version="0",
 javax.validation.*;version="0",
 org.springframework.*;version="[3.0,4.0)",
 org.springframework.boot.*;version="0",
 org.springframework.security.*;version="[2.0,4.0)",
 org.togglz.*;version="${osgi.bundles.version:default}"

I'm not familiar with this bundlor template.mf format.
I took examples from spring-core and spring-security regarding versions.
For the rest I took "0" as I noticed in other files as well.
Does 4.0 mean that it should be in 4.0.x range? Spring is already in 4.2.x range so I then wonder if template.mf contents are correct?

I will create another PR in the togglz-site repo containing the documentation later.

<groupId>org.jboss.spec.javax.servlet</groupId>
<artifactId>jboss-servlet-api_3.0_spec</artifactId>
<scope>provided</scope>
</dependency>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need this dependency? Is it will be added to any application that uses this module? Hm... Looks like overkill and dependency to something from org.jboss maybe isn't good IMHO.

Do we need it for javax.servlet.* classes? What dependency Spring Boot uses for that?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is provided scope so I don't see the issue. This is how Togglz project depends on servlet spec.
It just assumes javax.servlet.* is available. Only needed to compile project, and actual servlet implementation provided by Boot (or it's appropriate starter).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think <optional> dependencies are fine. But I'm curious. Why is there an optional dependency on Hibernate Validator?

Togglz uses the JBoss provided Java EE spec Maven artifacts. Actually it doesn't matter so much which one is used as it is provided scoped.

@chkal
Copy link
Member

chkal commented Feb 12, 2016

@marceloverdijk Thank you very much for the pull request. I think it is fine.

I'll merge it now. Perhaps we get some more people to test as it is now part of the official snapshots.

Thanks a lot for your help. 🍻

chkal added a commit that referenced this pull request Feb 12, 2016
@chkal chkal merged commit f0af3a1 into togglz:master Feb 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants