-
Notifications
You must be signed in to change notification settings - Fork 123
no web.xml, WebApplicationInitializer #110
Comments
well it might be the case, but I guess providing web.xml and implementing WebInitializer is confronting one another. In my case, I want to skip XML at all, if possible. That is why I do not have web.xml, only implementation of WebInitializer. |
I've created another branch: https://github.com/staleks/gradleTomcatPlugin/tree/gretty-branch Now I have issue that classes from I will try more.... Stay tuned. |
At the moment I do not have a lot of time to look into this issue for my plugin. I'd love for other people to contribute. If you feel you want to dig deeper, I'd appreciate your time and contribution. |
can you at least check am I using plugin as intend? |
The problem is solved by using additional package in ComponentScan annotation: @Configuration
@ComponentScan(basePackages = {"rs.in.staleksit.foo.web.controller", "rs.in.staleksit.foo.service"})
@EnableWebMvc
public class FooWebMvcConfig extends WebMvcConfigurerAdapter {
// ...
} |
@akhikhl Does that fix it for both plugins? Which one are you referring to? |
There was concrete bug: "org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userController' defined in file...", which is spring-specific, not gradle-specific. |
So yes, fix is for both plugins in a sense, that the problem is not related to gradle plugins. |
Uhm... Sorry, it was more workaround, not an issue. Explanation: gretty {
jvmArg '-Dspring.profiles.active=development'
} |
So it was not spring problem but actually I was not aware of this property
|
Yes, you are right. Sorry for too quick, too wrong first answer 😸 |
Anyway, is it hard to make this working from command line? |
ok, minor update, I want to separate discussion of tomcat gradle plugin and gretty plugin. Now: I have created two github repositories Status: still not working and Status: working, but possible improvements noticed |
I opened new issue: akhikhl/gretty#99 |
Hi Benjamin,
today I've tried to access You by Twitter, regarding this issue.
I've created the public repository @github: https://github.com/staleks/gradleTomcatPlugin
I've first tried with Jetty plugin for gradle, but I've red somewhere that Jetty plugin doesn't support this.(no web.xml)
That is why I switched to tomcat plugin.
Please read README.md in provided repo, and if you are missing some pieces I will be glad to help you. Just want to solve this issue.
I'm preparing extensive Gradle POC for my company and would like to present some nice features of Gradle in NoviSad JUG. So it would be nice if this works by then.
Thank You
The text was updated successfully, but these errors were encountered: