Hi,
I'm trying to create an instance of EntityManager in confluence context...
...
private EntityManager entityManager;
...
@Autowired
public void setEntityManager(EntityManager entityManager) {
this.entityManager = entityManager;
}
...
but it is null. I have no declaration or definitions in atlassian-plugin.xml.
P.S. i do not want to specify db path or so like this:
EntityManager entityManager = EntityManagerBuilder
.url(jdbcProperties.url) // the JDBC url for database connection
.username(jdbcProperties.username)
.password(jdbcProperties.passord)
.auto() // configuring the connection pool, auto detects connection pools on the classpath
.useWeakCache() // an option to use weak caches
.build(); // actually builds the entity manager
or
EntityManager manager = new EntityManager("jdbc:mysql://localhost/ao_test", "user", "password");
is there a way to get a "pre" configured instance fom context or i have to define a class path and server path and user, user password and so on...
Thanks!