Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Mar 02 2021 12:43

    slyoldfox on master

    Fix documentation for SecurityC… (compare)

  • Feb 24 2021 21:03
    pushed to beforeach/across-platform
    Bump liquibase https://github.com/liquibase/liquibase/issues/1639 (compare)
  • Feb 24 2021 20:28
    pushed to beforeach/across
    And bump liquibase once more to 4.3.1, mysql connector 8.0.23 introduces support for returning dates as LocalDateTime (compare)
  • Feb 24 2021 19:01
    pushed to beforeach/across-autoconfigure
    Move to new spring.config.import setup to use ConfigDataContextRefresher. This avoids using LegacyContextRefresher (which has a bug https://github.com/spring-cloud/spring-cloud-commons/issues/892) (compare)
  • Feb 24 2021 14:56
    pushed to beforeach/across-platform
    Bump to Spring Boot 2.4.3 (compare)
  • Feb 24 2021 14:37
    pushed to beforeach/across-autoconfigure
    Updated to spring-cloud-dependencies 2020.0.1 (compare)
  • Feb 24 2021 08:53
    pushed to beforeach/across
    Bump to Spring Boot 2.4.3 Mock request.getDispatcherType due to a change in https://github.com/spring-projects/spring-framework/issues/26282 (compare)
  • Feb 15 2021 09:07
    pushed to beforeach/across-platform
    AXP-5.2.0 Update AXBUM to 3.1.1 (compare)
  • Feb 03 2021 19:23
    pushed to beforeach/across
    Reuse the SharedMetadataReaderFactory from Across (compare)
  • Feb 01 2021 11:43
    pushed to beforeach/across
    performance inprovement: across standard module will only scan for *Module.class file descriptors. We are also skipping java.lang and SettableIdBasedEntity classes when this is the super class. (compare)
  • Feb 01 2021 10:42
    pushed to beforeach/across
    Provide a clearer Exception when a module descriptor references a class which is not on the classpath (e.g. when an optional dependency inside a module is not reference inside the application that loads it) (compare)
  • Jan 25 2021 13:50

    slyoldfox on master

    Added documentation for 5.2 (compare)

  • Jan 25 2021 13:24

    slyoldfox on master

    Tag 5.1.0 Added documentation for 5.2 Added documentation for 5.2 (compare)

  • Jan 25 2021 08:37

    slyoldfox on 5.1.0

    Tag 5.1.0 (compare)

  • Jan 25 2021 08:36

    slyoldfox on 5.1.0

    (compare)

  • Jan 25 2021 08:35

    slyoldfox on 5.1.0

    (compare)

  • Jan 25 2021 08:34

    slyoldfox on 5.0.2

    (compare)

  • Jan 25 2021 08:33

    slyoldfox on 5.0.2

    (compare)

  • Jan 25 2021 08:31

    slyoldfox on 5.0.2

    Tag 5.0.2 (compare)

  • Jan 07 2021 16:46
    pushed to beforeach/across-platform
    Fix for a change in spring-web https://github.com/spring-projects/spring-framework/issues/23939#issuecomment-552888927 (compare)
Emmanuel Nyachoke
@enyachoke
Thanks @slyoldfox this is still impressive.
Valentín
@valentinlineiro
Hey guys, first I wanted to congratulate you for the hard work and excellent idea. I'm evaluating Across to implement a modular monolithic architecture, and I wonder if you plan to support Spring Boot 2 / Spring Framework 5 any soon
slyoldfox
@slyoldfox
@valentinlineiro Sorry for the late reply, we have been side-tracked on other projects for a while. It is on our roadmap, and will probably become Across Platform 4.0.0 (based on Spring Boot 2.1 and Spring Framework 5.1, maybe a Spring Boot 2.2 depending how fast things evolve).
Vusumuzi Khoza
@vusakhoza_gitlab
Hi howsit guys. Trying to use Across with Reactor Bus v2. However getting some issues. Noticed the Reactor dependency wasn't available from the Foreach nexus repo. Could this have something to do with it?
To be specific on the issues. The reactor Consumer classes aren't being picked up by component scan even though they are properly annotated as @Service. This is only happening with reactor consumer classes
slyoldfox
@slyoldfox
Which version of platform-bom are you using? Also which dependency of project reactor bus is that? You are talking about your own @Service class right?
@vusakhoza_gitlab Have you had a look at https://docs.across.dev/across-site/production/across/developing-applications/creating-an-application/project-structure.html for the basic project structure? Your @Service class should be located under the application package
Vusumuzi Khoza
@vusakhoza_gitlab
Using v2.1.5. and yes i seem to have the project structure correct. This is a custom @Service class that implements Consumer<Event<T>> which is an interface from the reactor bus dependency. Using Reactor bus v2.0.2
I know you guys have https://docs.across.dev/across-site/production/across-autoconfigure/adding-auto-configuration-support.html but wanted to find out here first if there's a known issue with reactor bus since it doesn't indicate any issues in the 'Across AutoConfiguration Report'
slyoldfox
@slyoldfox
Well we don't have support by default for Reactor bus (we haven't used it yet), so you will indeed have to setup auto-configuration yourself for it. You can find some examples of test-projects and the autoconfiguration itself on https://bitbucket.org/beforeach/across-autoconfigure/src/develop/
Vusumuzi Khoza
@vusakhoza_gitlab
Thats alright. Have you used any event bus with Across. I'm flexible enough to change cause i really need your Admin Module
Arne Vandamme
@arne-vandamme
What type of eventing are you looking for? Across only uses the Spring event system directly (https://docs.across.dev/across-site/production/across/developing-modules/events.html), in the past we have manually used MBassador as well
Vusumuzi Khoza
@vusakhoza_gitlab
Yeah Spring event system is ok but does things synchronously. Was looking for something that'd give me the ability to trigger asynchronous events utilizing threads. Ended up settling for Guava EventBus and its working so far with my default application module and no further tinkering
slyoldfox
@slyoldfox
For spring you would just need a SimpleAsyncTaskExecutor though? Have a look at point 3 on https://www.baeldung.com/spring-events
Vusumuzi Khoza
@vusakhoza_gitlab
Will check it out thanks
Matthew
@mattaed_twitter
It seems you cannot bootstrap Across with SpringBootServletInitializer when deploying to an external application server (Tomcat)
slyoldfox
@slyoldfox
@mattaed_twitter I'm not sure which version of Across Platform Bom you use and I'm not sure how I can help if you don't tell me what error or exception you are facing. However it used to be possible. There is an example at https://bitbucket.org/beforeach/across-platform/src/d670d1f153ebd95ce75cf83fe5f1d66107d88962/platform-bom-test/src/main/java/com/foreach/across/modules/platform/PlatformTestApplication.java?at=master#PlatformTestApplication.java-24,40. However due to containerization we are moving away from .war deployments (explicitly in the upcoming AXP 5.0.0) and will only support fat jar, fat war deployments out of the box.
Matthew
@mattaed_twitter
@slyoldfox I'm using Across Platform Bom 3.0.0.M1. Actually, there are no errors, but only a normal Spring Boot startup. No Across contexts was bootstrapped
Oyisco
@oyisco
How can i get across code sample that bootstrap a jar file or install a jar file that boot strap and make the application part of base module.
Steven Gentens
@sgentens
@oyisco I'm not really sure what you are trying to do. The sample application bootstraps an across application with the modules you have selected. Adding external dependencies can easily be done via maven or your IDE of choice. You can find more about the base setup of an application here: https://docs.across.dev/across-site/production/across/developing-applications/creating-an-application/index.html
We also have a guide on building a modular monolith: https://docs.across.dev/across-site/production/guides/modular-monoliths/index.html. It touches on working with application as well as creating modules within the same project. A shared module could also be defined and build in a separate maven project and then added to other projects as dependencies (if installed locally or deployed to a registry).
slyoldfox
@slyoldfox
@valentinlineiro we have released 5.0.0 which supports Spring Boot 2
Aniwange Tertese Amos
@aniwange33
hi guys , I am happy to finally join you guys here
slyoldfox
@slyoldfox
Welcome @aniwange33
slyoldfox
@slyoldfox
We released Across Platform 5.0.2, see https://across.dev/blog/across-platform-5-0-2-released for more info on this release.
Andrea Scasso
@ascasso_gitlab
I found a small bug in initializr-application/src/main/resources/templates/modules/across-hibernate-jpa-module/DomainConfiguration.java line 46 I changed new Sort to Sort.by and seems to compile and run OK.
1 reply
slyoldfox
@slyoldfox
Thanks Andrea, we will fix it as soon as possible.
We released Across Platform 5.1, see https://across.dev/blog/across-platform-5-1-released for all changes in this release. If you want Spring Boot 2.3, you want to grab this.
Khiêm Trần
@khiemtranthien

Hey guys,
I checkout a new Across project from Across Initializer, then start it. I always get this error in my console log even though the function is still running well.

2021-01-24 19:32:10.232 ERROR 22840 --- [nio-8080-exec-7] o.a.c.c.C.[Tomcat].[localhost]           : Exception Processing ErrorPage[errorCode=0, location=/error]

org.apache.catalina.connector.ClientAbortException: java.io.IOException: An established connection was aborted by the software in your host machine
    at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:309) ~[tomcat-embed-core-9.0.39.jar:9.0.39]
    at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:272) ~[tomcat-embed-core-9.0.39.jar:9.0.39]
    at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:118) ~[tomcat-embed-core-9.0.39.jar:9.0.39]
    at org.springframework.http.converter.AbstractGenericHttpMessageConverter.write(AbstractGenericHttpMessageConverter.java:105) ~[spring-web-5.2.10.RELEASE.jar:5.2.10.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:277) ~[spring-webmvc-5.2.10.RELEASE.jar:5.2.10.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.HttpEntityMethodProcessor.handleReturnValue(HttpEntityMethodProcessor.java:219) ~[spring-webmvc-5.2.10.RELEASE.jar:5.2.10.RELEASE]
    at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:82) ~[spring-web-5.2.10.RELEASE.jar:5.2.10.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:123) ~[spring-webmvc-5.2.10.RELEASE.jar:5.2.10.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:878) ~[spring-webmvc-5.2.10.RELEASE.jar:5.2.10.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:792) ~[spring-webmvc-5.2.10.RELEASE.jar:5.2.10.RELEASE]
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.2.10.RELEASE.jar:5.2.10.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) ~[spring-webmvc-5.2.10.RELEASE.jar:5.2.10.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) ~[spring-webmvc-5.2.10.RELEASE.jar:5.2.10.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.2.10.RELEASE.jar:5.2.10.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.2.10.RELEASE.jar:5.2.10.RELEASE]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:626) ~[tomcat-embed-core-9.0.39.jar:4.0.FR]
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.2.10.RELEASE.jar:5.2.10.RELEASE]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[tomcat-embed-core-9.0.39.jar:4.0.FR]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.39.jar:9.0.39]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.39.jar:9.0.39]
    at org.springframework.web.servlet.resource.ResourceUrlEncodingFilter.doFilter(ResourceUrlEncodingFilter.java:65) ~[spring-webmvc-5.2.10.RELEASE.jar:5.2.10.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.39.jar:9.0.39]

Anyone know the problem?

3 replies
slyoldfox
@slyoldfox
What were you using before?
Are you seeing this in your IDE? in your console with spring-boot:run ? Which modules were you running? Do you have a sample project you van share that replicates the behaviour @khiemtranthien
Khiêm Trần
@khiemtranthien

Thank for your rep @slyoldfox
Today, I generated a demo project again from Across Initializr but with version 5.0.2 RELEASE and run it in IntelliJ. I added controller package, SampleController controller, and hit http://localhost:8080/applicationKey, it runs very well, no error at the console at all.
I continue Customizing modules before starting section, adding

@ModuleConfiguration(SpringSecurityModule.NAME)
public class SecurityConfiguration

in application.extensions package and re-run with mvn spring-boot:run. New error occurs:

Caused by: java.lang.IllegalStateException: Cannot apply org.springframework.security.config.annotation.authentication.configurers.provisioning.InMemoryUserDetailsManagerConfigurer@246c1
21d to already built object
        at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.add(AbstractConfiguredSecurityBuilder.java:196)
        at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.apply(AbstractConfiguredSecurityBuilder.java:133)
        at org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder.apply(AuthenticationManagerBuilder.java:290)

Do you have any idea about it?

slyoldfox
@slyoldfox
@khiemtranthien could you post your whole securityconfiguration class?
slyoldfox
@slyoldfox
Something like this should work:
@ModuleConfiguration(SpringSecurityModule.NAME)
@EnableGlobalAuthentication
public class SecurityConfiguration
{
    @Autowired
    public void configureGlobal( AuthenticationManagerBuilder auth ) throws Exception {
        auth.inMemoryAuthentication()
            .withUser( "admin" ).password( "{noop}admin" )
            .authorities( "access administration" );
    }
}
Khiêm Trần
@khiemtranthien
@slyoldfox awesome, it works. It looks like the documentation is out of date. https://docs.across.dev/across-site/production/across/developing-applications/extend-module-configuration.html
Thank for your help!
slyoldfox
@slyoldfox
thank you @khiemtranthien I'll update the documentation for the coming 5.2 release
Emeka
@drjavanew
Hello all. How can I use swagger in my across application
slyoldfox
@slyoldfox
Emeka
@drjavanew
Okay thanks done but I had issues with the guava version, had to exclude it in io.springfox. This should also be noted. Thanks
zhaojc
@zhaojc
i think you should put the source code to github
Rina
@Rina26724175_twitter
Hello Guys - two question (1) Is framework supports pagination - actually we do have an database entity having 12000 records (ii) Class A has reference of CLass B . Class B has overriden toString method. But while Class A data is displayed on UI - its not taking toString of B instead using 'name' attribute of Class B. Any inputs please?
dikum
@dikum
Hello guys,
I just got to hear of Across. I'm to manage an app using it.
How do I run and debug the individual modules without having to test everything together?
Steven Gentens
@sgentens
Hey @zhaojc , @Rina26724175_twitter @dikum , the framework is no longer under active development, currently it's in a maintenance mode for spring upgrades and arising security vulnerabilities, although I'm not aware of progress/timelines
Steven Gentens
@sgentens
@Rina26724175_twitter to name an instance, methods like #name and #label take precedence over the #toString method. To customize this, you can customize valuefetcher for the label property as per the following example:
    @Override
    public void configure( EntitiesConfigurationBuilder entities ) {
        entities.withType( MyObject.class )
                        .properties( 
                                props -> props.label()
                                        .valueFetcher( instance -> instance.getUILabel() )
                        );
    }
Steven Gentens
@sgentens

@dikum you can create integration tests where you bootstrap specific modules;
When you create an application via https://start.across.dev/ a sample integration test will be included. Defining a module as a bean at the application level is an alternative to specifying them through @AcrossApplication

@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
@SpringBootTest(classes = { MyAcrossApplication.class, MockMvcConfiguration.class, ITMyAcrossApplication.DbConfiguration.class })
@ActiveProfiles("it")
@ContextConfiguration(initializers = MockAcrossServletContextInitializer.class)
public class ITMyAcrossApplication
{
    @Autowired
    private MockMvc mockMvc;

    @Test
    public void bootstrappedOk() throws Exception {
        // Test should really do something - but when it gets called, bootstrap has been successful
        assertNotNull( mockMvc );
    }

    @Configuration
    static class DbConfiguration
    {
        @Bean
        MyAcrossMoudle myAcrossModule() {
            return new MyAcrossModule();
        }
    }
}

This example would add another module (MyAcrossModule) to the application specified in MyAcrossApplication

You can also bootstrap modules in a test setup as per the following example:
    @Test
    public void bootstrapWithoutBootstrapUiModule() {
        try (AcrossTestContext context = web( false )
                .modules( EntityModule.NAME )
                .build()) {
            assertThat( context.contextInfo().hasModule( BootstrapUiModule.NAME ) ).isFalse();
            assertThat( context.contextInfo().hasModule( AdminWebModule.NAME ) ).isFalse();

            assertThat( context.findBeanOfTypeFromModule( EntityModule.NAME, GenericEntityViewController.class ) ).isEmpty();
            assertThat( context.getBeansOfType( EntityViewLinks.class ) ).isEmpty();
            assertThat( context.getBeansOfType( EntityViewElementBuilderFactory.class ) ).isEmpty();

            assertThatExceptionOfType( IllegalArgumentException.class )
                    .isThrownBy( EntityModuleIcons.entityModuleIcons.formView::delete );
        }
    }
Steven Gentens
@sgentens

(1) Is framework supports pagination - actually we do have an database entity having 12000 records

Yes it supports pagination, pagination is enabled by default on the rendered list views based on the spring data repositories. @Rina26724175_twitter

Ram
@ramtwits_twitter
Will this be actively
developed in future