dschulten / hydra-java

Annotate your Java beans and serialize them as json-ld with hydra
Apache License 2.0
107 stars 27 forks source link

SpringBoot AutoConfiguration support and Hydra SpringBoot Starter #26

Open damnhandy opened 8 years ago

damnhandy commented 8 years ago

I've been messing around with Hydra-Java and SpringBoot and have the two working. I have taken the sample project and refactored it into a SpringBoot application:

https://github.com/damnhandy/hydra-springboot

It'd be useful to have a SpringBoot auto configuration module that would provision the correct types using something like an @EnableHydraServer annotation. Taking it a step further, one could also declare which mime types are enabled by specifying them in the annotation value:

@SpringBootApplication
@EnableHydraServer({HYDRA,SIREN,UBER})
public class HydraSampleServiceApplication { ...

I'd be happy to contribute this functionality, but I'm not sure that the core project is the best place for this functionality to live as those not using SpringBoot will not want to deal with those dependencies.

dschulten commented 7 years ago

Sorry for the late answer. Would it be ok to simply have a second sample project? There are probably people who need the setup for a SpringBoot app and others who need it as a war configuration. I use the war to deploy to OpenShift right now. I will link to your project from the README for the moment.