Coder Social home page Coder Social logo

andrehertwig / admintool Goto Github PK

View Code? Open in Web Editor NEW
11.0 4.0 8.0 2.09 MB

Extendable Admin UI

License: MIT License

Java 48.87% HTML 16.12% CSS 1.54% JavaScript 32.62% PLSQL 0.20% TSQL 0.66%
spring thymeleaf javamelody developer-tools spring-boot spring-security extendable quartz-scheduler log4j database

admintool's People

Contributors

andrehertwig avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

admintool's Issues

Enhancement: Recreate JMX Component to get it work with CSRF

Jminix is good and stable, but in case of enabled Spring Security CRSF Tokens, update fucntionality will not working anymore.
Furthermore it is a standalone application and brings maybe old and unnecessary dependencies.

Solution: create a own Module

Performance: cache found template urls

To avoid executing the regular expression all the time while template search, cache the found template url in relation to its resource name.
provide an option to deactivate the cache

Using Spring Boot 1.4.4RELEASE

Hi

I am using Spring Boot 1.4.4.RELEASE and getting below exception.

2017-02-01 18:36:33.548 INFO 15488 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@6b927fb: startup date [Wed Feb 01 18:36:33 IST 2017]; root of context hierarchy
2017-02-01 18:36:37.627 INFO 15488 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 9090 (http)
2017-02-01 18:36:37.667 INFO 15488 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat
2017-02-01 18:36:37.671 INFO 15488 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.11
2017-02-01 18:36:38.008 INFO 15488 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2017-02-01 18:36:38.008 INFO 15488 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 4469 ms
2017-02-01 18:36:38.523 INFO 15488 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/]
2017-02-01 18:36:38.524 INFO 15488 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/
]
2017-02-01 18:36:38.527 INFO 15488 --- [ost-startStop-1] .s.DelegatingFilterProxyRegistrationBean : Mapping filter: 'springSecurityFilterChain' to: [/*]
2017-02-01 18:36:38.528 INFO 15488 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2017-02-01 18:36:38.705 WARN 15488 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customWebMvcAutoConfig' defined in URL [jar:file:/C:/Users/app/.m2/repository/de/chandre/admin-tools/admin-tools-core/1.1.0/admin-tools-core-1.1.0.jar!/de/chandre/admintool/core/CustomWebMvcAutoConfig.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [de.chandre.admintool.core.CustomWebMvcAutoConfig$$EnhancerBySpringCGLIB$$f26a0197]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter: method ()V not found
2017-02-01 18:36:38.732 INFO 15488 --- [ main] utoConfigurationReportLoggingInitializer :

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2017-02-01 18:36:38.758 ERROR 15488 --- [ main] o.s.boot.SpringApplication : Application startup failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customWebMvcAutoConfig' defined in URL [jar:file:/C:/Users/app/.m2/repository/de/chandre/admin-tools/admin-tools-core/1.1.0/admin-tools-core-1.1.0.jar!/de/chandre/admintool/core/CustomWebMvcAutoConfig.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [de.chandre.admintool.core.CustomWebMvcAutoConfig$$EnhancerBySpringCGLIB$$f26a0197]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter: method ()V not found
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1155) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866) ~[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) ~[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762) ~[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:372) ~[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) ~[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1187) ~[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1176) ~[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
at org.naetag.admin.AdminDashBoardApplication.main(AdminDashBoardApplication.java:18) ~[classes/:na]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [de.chandre.admintool.core.CustomWebMvcAutoConfig$$EnhancerBySpringCGLIB$$f26a0197]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter: method ()V not found
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:154) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1147) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
... 17 common frames omitted
Caused by: java.lang.NoSuchMethodError: org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter: method ()V not found
at de.chandre.admintool.core.CustomWebMvcAutoConfig.(CustomWebMvcAutoConfig.java:14) ~[admin-tools-core-1.1.0.jar:na]
at de.chandre.admintool.core.CustomWebMvcAutoConfig$$EnhancerBySpringCGLIB$$f26a0197.() ~[admin-tools-core-1.1.0.jar:na]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0-ea]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[na:1.8.0-ea]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0-ea]
at java.lang.reflect.Constructor.newInstance(Constructor.java:414) ~[na:1.8.0-ea]
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
... 19 common frames omitted

404 template not found

the menuEntry.target should not start with a leading slash but 404 template path in abstractController does.
make it also more safe regarding configuring errors

Extending MenuIntegrityCheck

  • MenuCreation fails if a Component has no MainMenu
  • MenuIntegrityCheck doen't checks if a Component has a MainMenu
  • Menu integrity successful message will be displayed regardless of state

NPE if non-clickable submenue with no name

For submenues which will have no target page and maybe therefore no name an NPE will happen while rendering the menu

[http-nio-8090-exec-4] ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating SpringEL expression: "@adminToolMenuUtils.getListItemClass(activeMenu, menuItem)" (admintool/fragments/secFragements:13)] with root cause java.lang.NullPointerException at de.chandre.admintool.core.utils.AdminToolMenuUtils.lambda$1(AdminToolMenuUtils.java:120) ~[classes/:?]

CSS/JS hierarchy usage in menuEntries

Because of the new feature since 1.0.3 adding additional CSS and JS links to a menuEntry a reverse resolution to root menuItem of all CSS and JS could be useful

CDN Control

Because webjars/jsdeliver seems to have an an arbitrary versioning/path usage, more control for used external css/js could be useful

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.