I do not understand how we should deal with REST Services (v2 Platform 7 / Confluence 9) and Spring Java Config.
The example project on https://bitbucket.org/atlassian_tutorial/atlassian-plugins-osgi-javaconfig-demo/src/master/src/main/java/com/atlassian/plugins/example/javaconfig/config/MyJavaConfig.java shows that REST services are not explicitly set in the Configuration. The REST services are configured in the atlassian-plugin.xml and the injection seem to work without further configuration. But this example is for Platform 5 …
In REST Upgrade Guide we can read that we need to add the @Inject
(see “Add @Inject
to the constructor of the resource and provider classes”), but it is unclear
- if we need to do this despite we use Spring Java Config
- if we need to do this for REST services on Platform 7 as we do it for other services (components), although it is not necessary for previous versions
I can start the app on with Confluence 9.0.3 without mentioning REST Services in the Spring Java Config Configuration. But maybe this is only by coincidence?
What is the correct way of using REST services on Platform 7 / Confluence 9 with Spring Java Config regarding the @Inject
topic in the Upgrade Guide?
IMHO it would be helpful if the Upgrade Guide could be explicitly mention this for users of Spring Java Config on https://bitbucket.org/atlassian/atlassian-rest/src/8.0.x/UPGRADE_720.md. But maybe this is just me …