LightAdmin and Spring Boot

1,922 views
Skip to first unread message

Ilya Davydov

unread,
Apr 13, 2014, 10:58:08 AM4/13/14
to light...@googlegroups.com
Are you planning to migrate LightAdmin to Spring Boot?

Maxim Kharchenko

unread,
Apr 13, 2014, 5:47:19 PM4/13/14
to light...@googlegroups.com
Hi Illya, 

Currently, we're working on upgrading Spring Data/Rest to the latest version.
Right after that we'll integrate LightAdmin with Spring Boot ('cause it uses the latest versions as you probably noticed).

Cheers,
Max

Maxim Kharchenko

unread,
Jun 13, 2014, 2:43:05 PM6/13/14
to light...@googlegroups.com
Hi Illya,

Take a look at lightadmin-spring-boot for reference implementation.

Spring Boot + LightAdmin configuration example:

@Configuration
@ComponentScan
@EnableAutoConfiguration
@Order(HIGHEST_PRECEDENCE)
public class LightAdminBootApplication extends SpringBootServletInitializer {

    @Override
   public void onStartup(ServletContext servletContext) throws ServletException {
       LightAdmin.configure(servletContext)
               .basePackage("org.lightadmin.boot.administration")
               .baseUrl("/admin")
               .security(false)
               .backToSiteUrl("http://lightadmin.org");

        super.onStartup(servletContext);
   }

    public static void main(String[] args) throws Exception {
       SpringApplication.run(LightAdminBootApplication.class, args);
   }

    @Override
   protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
       return application.sources(LightAdminBootApplication.class);
   }
}

Feel free to ask in case of any questions.

Cheers,
Max
LightAdmin Team

Joshua Chaitin-Pollak

unread,
Aug 26, 2014, 9:53:31 PM8/26/14
to light...@googlegroups.com
Hello,

I am trying Light Admin 1.0.0M3 with this exact setup, but it doesn't seem to work. I can't even tell if Light Admin is actually being initialized. How can I debug this?

Joshua Chaitin-Pollak

unread,
Aug 26, 2014, 10:10:14 PM8/26/14
to light...@googlegroups.com
Hi,

I realized my problem was that we are running our Spring Boot application in Embedded mode, which I guess isn't supported yet. I tried adding the servletContextInitializer() found here:


I realize this is marked as in progress, but when I run this code and then try and access this page, I get a huge stacktrace that starts with:

java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: WebApplicationContext for namespace 'lightadmin-dispatcher-servlet': startup 
date [Tue Aug 26 22:04:01 EDT 2014]; parent: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@78691363
        at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:346) ~[spring-context-4.0.6.RELEASE.jar:4.0.6.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:333) ~[spring-context-4.0.6.RELEASE.jar:4.0.6.RELEASE]
        at org.springframework.web.servlet.FrameworkServlet.publishRequestHandledEvent(FrameworkServlet.java:1061) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:996) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:618) [tomcat-embed-core-8.0.9.jar:8.0.9]
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]


Is there any workaround, even a manual one, that I could apply to get LightAdmin working with an Embedded application? I'd really like to be able to use it but I need to keep my app embedded.

Thanks


Maxim Kharchenko

unread,
Sep 4, 2014, 11:04:30 AM9/4/14
to light...@googlegroups.com
Hi mate,
I've just ran LightAdmin + Spring Boot application in tomcat embedded mode.

Please check it out (LightAdmin+SpringBoot)!

Cheers,
Max
LightAdmin Team

Joshua Chaitin-Pollak

unread,
Sep 4, 2014, 12:59:53 PM9/4/14
to light...@googlegroups.com
Hi Max, works great, thanks! Awesome project.

Jean-Michel David

unread,
Sep 19, 2014, 1:22:09 PM9/19/14
to light...@googlegroups.com
Hello,

the sub-project is not there anymore...

Thanks.

Maxim Kharchenko

unread,
Sep 19, 2014, 4:48:55 PM9/19/14
to
Hi mate,

Spring Boot integration example has been moved to the separate repository https://github.com/la-team/lightadmin-springboot.
Please check it out and feel free to ask any questions.

Cheers,
Max
LightAdmin Team

mandeep singh

unread,
Dec 11, 2014, 6:23:57 AM12/11/14
to light...@googlegroups.com

Hi Max,

I have setup light admin in spring boot, But i am unable to run it.

What should be the url to see if its working.?




Cheers,
Mandeep
Reply all
Reply to author
Forward
0 new messages