Skip to content

Instantly share code, notes, and snippets.

@keerts
Last active January 17, 2019 14:18
Show Gist options
  • Save keerts/883b92b2ef0209aedcbd to your computer and use it in GitHub Desktop.
Save keerts/883b92b2ef0209aedcbd to your computer and use it in GitHub Desktop.
package nl.avisi.jira;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import com.atlassian.jira.component.ComponentAccessor;
import clojure.java.api.Clojure;
import clojure.lang.IFn;
public class MyBean implements InitializingBean, DisposableBean {
@Override
public void afterPropertiesSet() throws Exception {
IFn plus = Clojure.var("clojure.core", "+");
Object object = plus.invoke(1, 2);
LOGGER.debug("plus invoked, result was: " + object);
IFn require = Clojure.var("clojure.core", "require");
require.invoke(Clojure.read("clojure.tools.nrepl.server"));
IFn server = Clojure.var("clojure.tools.nrepl.server", "start-server");
server.invoke();
}
}
@RomanKotov
Copy link

Thank you for this hist, especially for importing ComponentAccessor.
Without being imported it could not be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment