croz-ltd / nrich Goto Github PK
View Code? Open in Web Editor NEWNrich is a Java library developed at CROZ whose purpose is to make development of applications on JVM a little easier.
License: Apache License 2.0
Nrich is a Java library developed at CROZ whose purpose is to make development of applications on JVM a little easier.
License: Apache License 2.0
It would be good for users to be able to change path in all the controllers with the ones specified in property values.
All controller have fully customisable URI.
At the moment, all Javadoc can be found in the repository, by browsing the code.
From user perspective, it would be easier to read Javadoc through a web page UI. One possible solution is GitHub Pages.
No web page/UI for nrich Javadoc present.
Web page/UI for nrich Javadoc present.
Current date formats are not inline with each other, value for date is using dots and value for datetime is using dashes as separator ("dd.MM.yyyy", "yyyy-MM-dd'T'HH:mm" ) sync them to use the same format by adding one additional for date and datetime.
Date and datetime format differ in separator used.
Date and datetime format use the same separator.
Not all beans in autoconfiguration classes have @ConditionalOnMissingBean annotation, go through the code and add where it is missing.
If using webflux with nrich-encrypt current principal is not resolved correctly. In the DefaultDataEncryptService implementation of DataEncryptionService the current principal is not used at all so it won't cause any issues. If the users decide to implement their own service and rely on the resolved principal in EncryptionContext there will be issues. The principal is resolved using SecurityContextHolder.getContext() which has its alternative in webflux in ReactiveSecurityContextHolder.
The principal is resolved correctly in webmvc and webflux environments.
The principal is not resolved in webflux environment.
NotificationErrorHandlingRestControllerAdvice supports unwrapping of exceptions and response resolving uses unwrapped exception, but the status is not resolved using the unwrapped but the original exception.
Configure a status for an exception in message.properties and throw an exception that should be unwrapped i.e ExecutionException, the configured status won't be returned.
The status configured for unwrapped exception is returned.
The status configured for original exception is returned.
The SearchExecutorJpaRepositoryFactoryBean
initialization fails when beanFactory.getBean()
methods are called during beanFactory initialization (i.e., from Spring Boot auto-configurations executed after nrich-search-spring-boot-starter
auto-configuration).
The SearchExecutorJpaRepositoryFactoryBean
contains a single constructor that requires two parameters, the Class
for repository interface and nrich-search
specific RepositoryFactorySupportFactory
instance. The problem is that Spring Data expects the class extended from RepositoryFactoryBeanSupport
with the constructor with a single parameter - the Class
of repository interface (see org.springframework.data.repository.config.RepositoryBeanDefinitionBuilder.build()
). That leaves the
second constructor parameter unresolved when the corresponding bean definition is created during the initialization of Spring's bean factory.
In some cases, this works, but if any of beanFactory.getBean()
methods are called during bean factory initialization, creation of all defined beans is triggered. If we have a bean definition with unresolved constructor parameters at this point, Spring throws UnsatisfiedDependencyException
complaining about ambiguous constructor argument values.
In this case, above behavior is triggered from Axon Framework's AbstractQualifiedBeanCondition.getMatchOutcome()
method, which calls beanFactory.getBeanNamesForType()
.
The SearchExecutorJpaRepositoryFactoryBean
initialization does not fail when beanFactory.getBean()
methods are called during beanFactory initialization.
The SearchExecutorJpaRepositoryFactoryBean
initialization fails when beanFactory.getBean()
methods are called during beanFactory initialization
At the moment, source files don't contain licence header, e.g. Spring.
There are no licence headers in any source files.
There should be same licence header in all source files.
Currently the returned values for form label and column header in registry configuration start with lowercase. It would be good for them to start with uppercase so users don't have to override those values and can use the default configuration.
formLabel, columnHeader start with lowercase.
formLabel, columnHeader start with uppercase.
When property being searched is of Instant type no matter which format is sent it doesn't work. Also just in case check other date types as well.
Users are able to search Instants.
Users are unable to search Instants.
Currently the files that contain messages are called notificationMessages and validationMessages. Change camel case to kebab case and add nrich prefix. The new names should be nrich-notification-messages and nrich-validation-messages
Upgrade dependencies of all libraries to latest versions, possibly refactor code to match the new versions used (remove deprecated code etc).
Used dependencies are outdated.
The dependencies used are the latest versions.
Currently notification services have generics that make them hard to use, the default provided bean is of type NotificationResponseService<ResponseWithNotification<?>> that then causes sonar warning and requires casts to be able to use effectively, this should be refactored in a way that avoids wildcards.
Wildcards in NotificationResponseService type parameters.
No wildcards in NotificationResponseService type parameters.
It would be good that searching by prefix supports any level of nested path, currently only the first level is checked (i.e. properties contained in the parent object).
Only properties found in the parent can be found by prefix search.
Properties found in the any level of nesting can be found by prefix search.
We should upgrade Spring Boot (i.e. Spring Framework) to the latest release, as a new CVE was found recently.
Update Spring Boot version to 2.6.5 to fix this issue.
Expression DoS Vulnerability present in project, transitively, via old Spring version.
Expression DoS Vulnerability not present in project after upgrading to newest Spring version.
We should upgrade the Apache POI library to the latest stable version (5.2.2 at the time of opening this issue) as a "medium level" vulnerability was found in version 5.2.0.
Vulnerability present in project, transitively, via Apache POI version 5.2.0.
Vulnerability not present in project after upgrading Apache POI to latest version.
Currently there is no editorconfig in the project which makes it harder to keep coding style in check.
It would be best to add the editorconfig, reformat all the source files and align other coding style differences if they are found. Also in scope of this it would be good to remove the final modifier on parameters and local variables since reduces readability.
Current documentation for pagination using MultiRowDataProvider and Spring Data Jpa repository is not correct, start is passed in as page number but start in MultiRowDataProvider is not the same as page number.
Documentation incorrectly describes usage of MultiRowDataProvider.
Documentation correctly describes usage of MultiRowDataProvider.
Update url in main README to https://croz-ltd.github.io/nrich .
Github Pages Javadoc badge link broken.
Github Pages Javadoc badge link works.
Github Pages Javadoc badge link broken.
At the moment, the only way to learn Nrich is by reading documentation and source code. It would be useful to have example applications which would showcase Nrich features by example.
Some modules currently display following messages during startup:
Bean ... of type ... is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
it would be good to check those messages and if there are some issues behind them solve them.
Messages: "Bean ... of type ... is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)" shown on startup.
Ideally no messages like "Bean ... of type ... is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)" shown on application startup.
The name for nrich-spring-util is not inline with nrich-spring-boot it would be better to remove the util suffix.
Module is named nrich-spring-util.
Module is named nrich-spring.
Currently to specify mapping between formId and class that holds the validations for that formId users need to specify a bean of type Map<String, Class<?>> that doesn't seem to be inline with rest of the projects, it would be better to allow specifying through properties file.
Users need to define a bean with configuration mapping.
Users can specify mapping using properties file.
In real world, in most cases users would probably use Nrich with some frontend. After #55, it would be useful to have example frontend application which would showcase some Nrich features by example.
The continuation indent of 8 seems a bit too much, switch to using continuation indent to 4 and reformat code to match this change. There also seems to be some lines longer than 200 character, add line breaks where needed. Reformat AutoConfiguration tests to have asserts in a separate line. Remove extra empty lines where applicable. Order Lombok annotations and use minimal set. Introduce constants where missing.
Currently to specify registry configuration users need to define a bean of RegistryConfiguration that doesn't seem to be inline with rest of the projects, it would be better to allow specifying through properties file.
Users need to define a bean with registry configuration.
Users can specify configuration using properties file.
Currently the returned value for javascriptType in registry configuration is in uppercase (i.e. NUMBER, STRING) since those types in Javascript are all lowercase it would be good to match that.
javascriptType for properties in RegistryConfiguration is in uppercase.
javascriptType for properties in RegistryConfiguration is in lowercase.
It would be good to reduce number of sonar issues, some might be invalid others not possible to fix (at least easily) so it is not necessary to fix all the issues just the ones that make sense.
Sonar reports issues that can be easily fixed.
Sonar reported issues that can be fixed are fixed.
Ignore sonar issues.
Currently all our modules have same description it would be better that they all have their individual descriptions.
All modules have the same description.
Each module has unique description.
When creating query from a collection of values in case the collection is empty it should be skipped since it makes no sense to search by empty collection.
Request with empty collection results in a query that never returns any value.
Empty collection should be skipped when creating a query.
The root gradle project name is currently defined as "nrichcode" in settings.gradle
. Rename to "nrich" as "nrichcode" is the old legacy name of the project.
Root gradle project is named "nrichcode".
Root gradle project is named "nrich".
It would be good for nrich-excel to work with OutputStream instead of using File as input. Not all users need a File created and this would make API more flexible.
ExcelReportService accepts a File inside CreateExcelReportRequest argument of createExcelReport method.
ExcelReportService accepts an OutputStream inside CreateExcelReportRequest argument of createExcelReport method.
Add a class annotation for defining form id.
The proposed name for the annotation is @FormConfiguration
.
Both ways would be supported, defining mappings through property files and using the annotation.
If both are used, the property file would take precedence.
Mappings between form id and corrresponding clases have to be defined in a property file.
nrich.form-configuration:
default-converter-enabled: true
form-configuration-mapping:
user.create-form: net.croz.nrich.example.CreateUserRequest
user.update-form: net.croz.nrich.example.UpdateUserRequest
Use annotation to define form id.
@FormConfiguration("user.create-form")
public class CreateUserRequest {
...
}
No test for FormConfigurationController
Test exists for FormConfigurationController
It would be useful for users to document which Nrich major versions are compatible with which Java and Spring/Spring Boot versions.
Remove 3rd party Gradle plugin org.kordamp.gradle.jacoco
introduced in #25 and replace with new internal plugin introduced in Gradle 7.4.
3rd party Gradle plugin org.kordamp.gradle.jacoco
used for aggregated test reports.
3rd party Gradle plugin org.kordamp.gradle.jacoco
not used for aggregated test reports, as there is an internal Gradle plugin present now.
It would be good to find a way to optimise query creation in nrich-search module. Currently each query will always check all properties being searched against entity. It would be better to analyse just once all the possible mappings between class holding restrictions and JPA entity and then cache and reuse those mappings depending on the property values.
We would like a way of tracking our architecture decisions in the project as to make onboarding of new developers easier
and keep track of important changes inside the project.
No explanation of the current architecture exists.
A list of architecture decision records exists explaining the current state of project. All future decisions are also recorded.
Currently when users want to export data to excel they always need to implement a MultiRowDataProvider interface, when users have just flat data that is cumbersome, it would be better to provide a simpler API for flat data.
When providing flat data users need to provide a MultiRowDataProvider implementation i.e.
Object[][] data = new Object[][] { { "firstRow" }, { "secondRow" } }; MultiRowDataProvider multiRowDataProvider = (start, limit) -> start == 0 ? data : null;
Skip users creation of MultiRowDataProvider and add a property to CreateExcelReportRequest that supports flat data.
It would be useful to have a starter module for nrich-logging, most of the others have them this one seems to be an exception.
No Spring Boot starter module present for nrich-logging.
Spring Boot starter module present for nrich-logging.
It would be useful to add support for searching by @naturalid annotated properties, it provides better caching than usual query cache. This is only possible with Hibernate JPA provider. It would be best to add another repository interface that users can use to add desired functionality. For details see: https://vladmihalcea.com/the-best-way-to-map-a-naturalid-business-key-with-jpa-and-hibernate/
No support for searching by @naturalid annotated properties.
Searching by @naturalid annotated properties works.
It would be good to have a bom/platform module that will provide all nrich dependencies as a bom and allow users to use that
for dependency version management./
Users need to include versions for each dependency added.
Users import bom/platform module and use the dependency versions defined there.
Enhance existing README files by adding information regarding the
Note: this issue should be worked on after #58, as there will be changes to the release/publish process and some actions.
Missing documentation regarding the release/publish process, and all configured GitHub actions.
Documentation regarding the release/publish process, and all configured GitHub actions added.
Currently in StringSearchExecutor it is not possible to search by ranges i.e. dateFrom, dateTo, numberFrom, numberTo etc as it is in SearchExecutor. It would be good to add that functionality from SearchExecutor to StringSearchExecutor
Range queries are not supported.
Range queries are supported.
Using custom SearchConfiguration
Currently for caching in DefaultTransientPropertyResolverService a ConcurrentHashMap is used. It would be better to use @Cacheable annotation to allow users to configure caching and avoid potential memory issues.
ConcurrentHashMap is used for caching.
@Cacheable annotation is used for caching
org.kordamp.gradle.jacoco
plugin to have aggregated test reportsNo code coverage visualisation tool integrated.
Code coverage visualisation tool (app.codecov.io) integrated.
Currently in tests there is only a warning logged about missing logger implementation, it would be better to add a logger implementation at least in the test scope.
No logs in tests.
Logs in tests visible.
We would like to enhance the codecov configuration as currently, only the default codecov behaviour applies.
We would like to have checks that explicitly check whether
Default codecov behaviour.
Minimum code coverage explicitly configured.
We want to enhance the release process of our libraries, in a way that a release can be automatically triggered with a GitHub Action. We could replace the existing "Publish" action with a new "Release" action which would both generate a GitHub release and publish the artifacts to Maven Central. Also, we would like to enhance/beautify the changelog generation for releases, and JReleaser seems like the perfect fit.
It seems that not all projects declare required dependencies while other have extra dependencies, they should all just use a minimal set off required dependencies. This has been seen in nrich-form-configuration module but would be best to go through all the modules.
Add each of the modules and see if they can be run without additional configuration. It would be best to use "pure" Spring project because Spring Boot will probably cover all the dependencies.
All modules work without adding additional dependencies manually .
Not all modules work without adding additional dependencies.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.