Catalysts / cat-boot-structurizr-sample

Sample project for cat-boot-structurizr
Apache License 2.0
4 stars 1 forks source link

Unsuccessful in getting up and running with your sample #2

Open deinspanjer opened 6 years ago

deinspanjer commented 6 years ago

I really liked the idea of doing the dsl work in Kotlin and taking advantage of some of the nice features of Spring Boot, but I ran into two problems that I was ultimately unable to figure out. :/

The first was how to add a configuration parameters file such that I could read in certain values from it. Went down a rat-hole of how to get it properly defined and annotated, and for a while I did have it successfully working, but then suddenly it started complaining that the configuration class may not be final. I don't know if it finally picked up a change from Kotlin 1.2.50 to 1.2.60 or something else.

The other problem was that I really needed to take advantage of the structurizr component finders (namely the spring-component-finder to start with). When I was able to run the app using that finder, it spewed out tons of errors saying "A component type must be provided.". Right as I tried to get set up to debug that, the build stopped working and I had to give up.

If there is any chance you guys might add to this demo showing how to use a config property file and how to use a component scanner, it would be really great.

deinspanjer commented 6 years ago

I would still really love a bit thicker of an example. That said, I took another crack at this and got a little further before having to set it aside in favor of the plain Java version again.

  1. The error I was getting about "A component type must be provided" is just something that happens any time a finder hits a nested class. I couldn't find any good information on the struturizr repo about this issue, but it doesn't seem to be a complete blocker.

  2. If you are trying to use this project on an application that also uses Spring Boot, you run into a lot of problems. Especially if that project uses a different version than what this project depends on (currently 2.0.3). Things like getting lots of injection errors and component failures as Spring tries to dig into the other application while starting this one. Also hit problems with logging implementation differences that I was unable to work around successfully.