kandi background
Explore Kits

modelmapper-spring-boot-starter | Spring Boot Starter for ModelMapper http | Model View Controller library

 by   jmnarloch Java Version: 1.1.0 License: Apache-2.0

 by   jmnarloch Java Version: 1.1.0 License: Apache-2.0

kandi X-RAY | modelmapper-spring-boot-starter Summary

modelmapper-spring-boot-starter is a Java library typically used in Architecture, Model View Controller, Spring Boot, Spring applications. modelmapper-spring-boot-starter has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can download it from GitHub, Maven.
Spring Boot Starter for ModelMapper
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • modelmapper-spring-boot-starter has a low active ecosystem.
  • It has 99 star(s) with 22 fork(s). There are 10 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 1 open issues and 4 have been closed. There are 1 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of modelmapper-spring-boot-starter is 1.1.0
This Library - Support
Best in #Model View Controller
Average in #Model View Controller
This Library - Support
Best in #Model View Controller
Average in #Model View Controller

quality kandi Quality

  • modelmapper-spring-boot-starter has 0 bugs and 0 code smells.
This Library - Quality
Best in #Model View Controller
Average in #Model View Controller
This Library - Quality
Best in #Model View Controller
Average in #Model View Controller

securitySecurity

  • modelmapper-spring-boot-starter has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • modelmapper-spring-boot-starter code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
This Library - Security
Best in #Model View Controller
Average in #Model View Controller
This Library - Security
Best in #Model View Controller
Average in #Model View Controller

license License

  • modelmapper-spring-boot-starter is licensed under the Apache-2.0 License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
This Library - License
Best in #Model View Controller
Average in #Model View Controller
This Library - License
Best in #Model View Controller
Average in #Model View Controller

buildReuse

  • modelmapper-spring-boot-starter releases are available to install and integrate.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • Installation instructions, examples and code snippets are available.
  • It has 217 lines of code, 26 functions and 8 files.
  • It has low code complexity. Code complexity directly impacts maintainability of the code.
This Library - Reuse
Best in #Model View Controller
Average in #Model View Controller
This Library - Reuse
Best in #Model View Controller
Average in #Model View Controller
Top functions reviewed by kandi - BETA

kandi has reviewed modelmapper-spring-boot-starter and discovered the below as its top functions. This is intended to give you an instant insight into modelmapper-spring-boot-starter implemented functionality, and help decide if they suit your requirements.

  • Returns the model mapper .
    • The model mapper factory bean .
      • Configures the model mapper .
        • Returns the object type .
          • Returns true if the value is singleton .

            Get all kandi verified functions for this library.

            Get all kandi verified functions for this library.

            modelmapper-spring-boot-starter Key Features

            Registers the ModelMapper as a Spring bean and allows to configure it and register specific object mappings.

            modelmapper-spring-boot-starter Examples and Code Snippets

            Community Discussions

            Trending Discussions on modelmapper-spring-boot-starter
            • All subsequent calls to Neo4j freezes after handling a ClientException from @Index(unique=true)
            Trending Discussions on modelmapper-spring-boot-starter

            QUESTION

            All subsequent calls to Neo4j freezes after handling a ClientException from @Index(unique=true)

            Asked 2017-May-30 at 17:13

            I have a Spring boot application that has an Entity with an uniqueness constraint on a field.

            im running spring-boot, spring-data-neo4j, neo4j-ogm, bolt-driver and the neo4j 3.2 docker image.

            When i run my IT tests, i first persist some data, then i try to persist the same data to get the constraint to trigger.

            The uniqueness constraint kicks in as expected in and a ClientException is thrown. This is caught and a proper exception is returned to the client.

            Then in the following test i just try to save some data and suddenly the server just freezes when it runs the save() in the GraphRepository.

            So my question is why does neo4j completly freeze in my case in all following transactions after a ClientException has been thrown due to a uniqueness constraint has kicked in. Logs say nothing, neo4j debug.log says nothing.

            If i run each test separate, they both pass. Run together, it freezes neo4j in the test after the constaint has been tested.

            pom.xml

            <?xml version="1.0" encoding="UTF-8"?>
            <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
            
            <groupId>se.andolf</groupId>
            <artifactId>lift</artifactId>
            <version>0.0.1-SNAPSHOT</version>
            <modelVersion>4.0.0</modelVersion>
            <packaging>pom</packaging>
            
            <modules>
                <module>lift-api</module>
                <module>lift-service</module>
                <module>lift-app</module>
            </modules>
            
            <properties>
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
                <java.version>1.8</java.version>
                <spring.boot.version>1.5.3.RELEASE</spring.boot.version>
                <spring-data-releasetrain.version>Ingalls-SR3</spring-data-releasetrain.version>
                <neo4j-ogm.version>2.1.2</neo4j-ogm.version>
            </properties>
            
            <parent>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-parent</artifactId>
                <version>1.5.3.RELEASE</version>
            </parent>
            
            <dependencyManagement>
                <dependencies>
                    <dependency>
                        <groupId>org.springframework.data</groupId>
                        <artifactId>spring-data-releasetrain</artifactId>
                        <version>Ingalls-SR3</version>
                        <type>pom</type>
                        <scope>import</scope>
                    </dependency>
                    <dependency>
                        <groupId>se.andolf</groupId>
                        <artifactId>lift-api</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>se.andolf</groupId>
                        <artifactId>lift-common</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>se.andolf</groupId>
                        <artifactId>lift-service</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-security</artifactId>
                        <version>${spring.boot.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-validation</artifactId>
                        <version>${spring.boot.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-web</artifactId>
                        <version>${spring.boot.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-actuator</artifactId>
                        <version>${spring.boot.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-data-neo4j</artifactId>
                        <version>${spring.boot.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.neo4j</groupId>
                        <artifactId>neo4j-ogm-core</artifactId>
                        <version>${neo4j-ogm.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.neo4j</groupId>
                        <artifactId>neo4j-ogm-bolt-driver</artifactId>
                        <version>${neo4j-ogm.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>com.github.jmnarloch</groupId>
                        <artifactId>modelmapper-spring-boot-starter</artifactId>
                        <version>1.1.0</version>
                    </dependency>
                    <dependency>
                        <groupId>com.fasterxml.uuid</groupId>
                        <artifactId>java-uuid-generator</artifactId>
                        <version>3.1.3</version>
                    </dependency>
                    <dependency>
                        <groupId>com.github.fge</groupId>
                        <artifactId>json-patch</artifactId>
                        <version>1.9</version>
                    </dependency>
                    <dependency>
                        <groupId>io.springfox</groupId>
                        <artifactId>springfox-swagger2</artifactId>
                        <version>2.6.0</version>
                    </dependency>
                    <dependency>
                        <groupId>io.springfox</groupId>
                        <artifactId>springfox-swagger-ui</artifactId>
                        <version>2.6.0</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-test</artifactId>
                        <version>${spring.boot.version}</version>
                        <scope>test</scope>
                    </dependency>
                    <dependency>
                        <groupId>io.rest-assured</groupId>
                        <artifactId>rest-assured</artifactId>
                        <version>3.0.3</version>
                    </dependency>
                </dependencies>
            </dependencyManagement>
            
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.springframework.boot</groupId>
                            <artifactId>spring-boot-maven-plugin</artifactId>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-failsafe-plugin</artifactId>
                            <version>2.18.1</version>
                        </plugin>
                        <plugin>
                            <groupId>com.spotify</groupId>
                            <artifactId>docker-maven-plugin</artifactId>
                            <version>0.4.11</version>
                        </plugin>
                    </plugins>
                </pluginManagement>
            
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>3.5.1</version>
                        <configuration>
                            <source>1.8</source>
                            <target>1.8</target>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            
            <profiles>
                <profile>
                    <id>integration-tests</id>
                    <build>
                        <plugins>
                            <plugin>
                                <groupId>org.jacoco</groupId>
                                <artifactId>jacoco-maven-plugin</artifactId>
                                <version>0.7.7.201606060606</version>
                                <executions>
                                    <execution>
                                        <id>default-prepare-agent</id>
                                        <goals>
                                            <goal>prepare-agent</goal>
                                        </goals>
                                    </execution>
                                    <execution>
                                        <id>default-prepare-agent-integration</id>
                                        <goals>
                                            <goal>prepare-agent-integration</goal>
                                        </goals>
                                    </execution>
                                    <execution>
                                        <id>default-report</id>
                                        <goals>
                                            <goal>report</goal>
                                        </goals>
                                    </execution>
                                    <execution>
                                        <id>default-report-integration</id>
                                        <goals>
                                            <goal>report-integration</goal>
                                        </goals>
                                    </execution>
                                </executions>
                            </plugin>
                        </plugins>
                    </build>
                </profile>
                <profile>
                    <id>coveralls</id>
                    <build>
                        <plugins>
                            <plugin>
                                <groupId>org.eluder.coveralls</groupId>
                                <artifactId>coveralls-maven-plugin</artifactId>
                                <version>4.3.0</version>
                            </plugin>
                        </plugins>
                    </build>
                </profile>
            </profiles>
            

            lift-service/pom.xml

            <?xml version="1.0" encoding="UTF-8"?>
            <project xmlns="http://maven.apache.org/POM/4.0.0"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
            <parent>
                <artifactId>lift</artifactId>
                <groupId>se.andolf</groupId>
                <version>0.0.1-SNAPSHOT</version>
            </parent>
            
            <modelVersion>4.0.0</modelVersion>
            
            <artifactId>lift-service</artifactId>
            <packaging>jar</packaging>
            
            <dependencies>
                <dependency>
                    <groupId>se.andolf</groupId>
                    <artifactId>lift-api</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-data-neo4j</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.neo4j</groupId>
                    <artifactId>neo4j-ogm-core</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.neo4j</groupId>
                    <artifactId>neo4j-ogm-bolt-driver</artifactId>
                </dependency>
                <dependency>
                    <groupId>com.github.fge</groupId>
                    <artifactId>json-patch</artifactId>
                </dependency>
                <dependency>
                    <groupId>com.github.jmnarloch</groupId>
                    <artifactId>modelmapper-spring-boot-starter</artifactId>
                </dependency>
            </dependencies>
            

            session bean configuration:

            @Configuration
            @EnableNeo4jRepositories(basePackages = "se.andolf")
            @EnableTransactionManagement
            public class SessionConfig {
            
                @Bean
                public SessionFactory sessionFactory(){
                    LOG.debug("Loading session factory");
                    return new SessionFactory("se.andolf");
                }
            
                @Bean
                public Neo4jTransactionManager transactionManager() {
                    return new Neo4jTransactionManager(sessionFactory());
                }
            }
            

            CategoryController.class

            @RestController
            @Api(tags = { "Categories" })
            public class CategoryController {
            
                @Autowired
                private CategoryService categoryService;
            
                @RequestMapping(method=PUT, value="/categories")
                @ResponseStatus(HttpStatus.CREATED)
                public ResponseEntity<Void> add(
                    @RequestBody Category category, HttpServletRequest request) throws URISyntaxException {
                    final Long id = categoryService.save(category);
                    final HttpHeaders responseHeaders = new HttpHeaders();
                    responseHeaders.setLocation(new URI(request.getRequestURL().toString() + "/" + id));
                    return new ResponseEntity<>(responseHeaders, HttpStatus.CREATED);
                }
            }
            

            CategoryService.class

            @Service
            @Transactional
            public class CategoryService {
                private static Log LOG = LogFactory.getLog(CategoryService.class);
            
                @Autowired
                private CategoryRepository categoryRepository;
            
                public Long save(Category category){
                    final CategoryEntity categoryEntity = new CategoryEntity(category.getName());
            
                    try {
                        return categoryRepository.save(categoryEntity).getId();
                    } catch (ClientException e) {
                        LOG.error("Category " + category.getName() + " exists select another name", e);
                        throw new NodeExistsException("Category " + category.getName() + " exists please select another name");
                    }
                }
            }
            

            CategoryEntity.class

            @NodeEntity
            public class CategoryEntity {
            
                @GraphId
                private Long id;
            
                @Index(unique=true)
                private String name;
            
                public CategoryEntity() {
                }
            
                public CategoryEntity(String name) {
                    this.name = name;
                }
            
                public Long getId() {
                    return id;
                }
            
                public String getName() {
                    return name;
                }
            
                public void setName(String name) {
                    this.name = name;
                }
            }
            

            ogm.properties

            driver=org.neo4j.ogm.drivers.bolt.driver.BoltDriver
            URI=bolt://neo4j:password@localhost
            connection.pool.size=150
            indexes.auto=assert
            

            last rows in the travic-ci log

            2017-05-28 08:58:34.316 DEBUG 7082 --- [nio-8080-exec-4] o.n.ogm.drivers.bolt.driver.BoltDriver   : No current transaction, starting a new one
            
            2017-05-28 08:58:34.317 DEBUG 7082 --- [nio-8080-exec-4] o.n.ogm.drivers.bolt.driver.BoltDriver   : Native transaction: org.neo4j.driver.internal.ExplicitTransaction@7e0a0bb1
            
            2017-05-28 08:58:34.317 DEBUG 7082 --- [nio-8080-exec-4] org.neo4j.ogm.session.Neo4jSession       : Thread 20: Transaction, tx id: org.neo4j.ogm.drivers.bolt.transaction.BoltTransaction@53533858
            
            2017-05-28 08:58:34.318 DEBUG 7082 --- [nio-8080-exec-4] o.s.d.n.t.Neo4jTransactionManager        : Beginning Transaction [org.neo4j.ogm.drivers.bolt.transaction.BoltTransaction@53533858] on Session [org.neo4j.ogm.session.Neo4jSession@730479f]
            
            2017-05-28 08:58:34.318 DEBUG 7082 --- [nio-8080-exec-4] o.s.d.n.t.Neo4jTransactionManager        : Found thread-bound Session [org.neo4j.ogm.session.Neo4jSession@730479f] for Neo4j OGM transaction
            
            2017-05-28 08:58:34.318 DEBUG 7082 --- [nio-8080-exec-4] o.s.d.n.t.Neo4jTransactionManager        : Participating in existing transaction
            
            2017-05-28 08:58:34.319 DEBUG 7082 --- [nio-8080-exec-4] org.neo4j.ogm.context.EntityGraphMapper  : context initialised with 0 relationships
            
            2017-05-28 08:58:34.319 DEBUG 7082 --- [nio-8080-exec-4] org.neo4j.ogm.context.EntityGraphMapper  : visiting: se.andolf.entities.CategoryEntity@7a132ac9
            
            2017-05-28 08:58:34.319 DEBUG 7082 --- [nio-8080-exec-4] org.neo4j.ogm.context.EntityGraphMapper  : se.andolf.entities.CategoryEntity@7a132ac9 has changed
            
            2017-05-28 08:58:34.319 DEBUG 7082 --- [nio-8080-exec-4] org.neo4j.ogm.context.EntityGraphMapper  : mapping references declared by: se.andolf.entities.CategoryEntity@7a132ac9 
            
            2017-05-28 08:58:34.320  INFO 7082 --- [nio-8080-exec-4] o.n.o.drivers.bolt.request.BoltRequest   : Request: UNWIND {rows} as row CREATE (n:`CategoryEntity`) SET n=row.props RETURN row.nodeRef as ref, ID(n) as id, row.type as type with params {rows=[{nodeRef=-2048076489, type=node, props={name=Arms}}]}
            
            
            
            No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
            Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
            
            The build has been terminated
            

            Full log can be found here: Travis-ci build log

            CategoriesControllerIT.class

            @RunWith(SpringRunner.class)
            @SpringBootTest(webEnvironment = DEFINED_PORT)
            public class CategoriesControllerIT {
            
                @Test
                public void shouldReturn409ConflictIfCategoryNameExists(){
            
                    final Category category = new Category("Arms");
                    final String id = put(category);
            
                    given()
                            .contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)
                            .body(category)
                        .when()
                            .put("/categories")
                        .then()
                            .statusCode(HttpStatus.CONFLICT.value());
            
                    deleteCategory(id);
                }
            
                @Test
                public void shouldSaveCategory(){
            
                    final Category category = new Category("Arms");
            
                    final String header = given()
                            .contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)
                            .body(category)
                        .when()
                            .put("/categories")
                        .then()
                        .assertThat()
                            .statusCode(201)
                            .header("Location", is(notNullValue()))
                            .extract().response().getHeader("Location");
            
                    deleteCategory(UriUtil.extractLastPath(header));
                }
            
                private String put(Category category) {
                    try {
                        final String header = given().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE).body(category).put("/categories").getHeader("Location");
                        return UriUtil.extractLastPath(header);
                    } catch (Exception e) {
                    throw new AssertionError(e);
                    }
                }
            }
            

            command to run neo4j as an docker for the IT-tests

            docker run -d --name neo4j --publish=7474:7474 --publish=7687:7687 --env=NEO4J_AUTH=neo4j/password neo4j:3.2
            

            This is only en excerpt of the full code base, i have pasted in what i think is relevant. The full code can be found here:

            Lift-app

            ANSWER

            Answered 2017-May-30 at 17:13

            After getting help on the neo4j-user slack the problem was that the drivers had problems closing the sessions when the transaction was closed.

            This got fixed in version 2.1.3 of the bolt-driver in the neo4j-ogm.

            So bumping the ogm version from 2.1.2 -> 2.1.3 resolved this issue.

            related issue: Make rollback close bolt session when transaction is closed

            related issue for the java-driver: java-driver version 1.3.1

            Source https://stackoverflow.com/questions/44262725

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install modelmapper-spring-boot-starter

            In order to add ModelMapper to your project simply add this dependency to your classpath:.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
            over 650 million Knowledge Items
            Find more libraries
            Reuse Solution Kits and Libraries Curated by Popular Use Cases
            Explore Kits

            Save this library and start creating your kit

            Install
            Clone
            • https://github.com/jmnarloch/modelmapper-spring-boot-starter.git

            • gh repo clone jmnarloch/modelmapper-spring-boot-starter

            • git@github.com:jmnarloch/modelmapper-spring-boot-starter.git

            Share this Page

            share link
            Consider Popular Model View Controller Libraries
            Try Top Libraries by jmnarloch
            Compare Model View Controller Libraries with Highest Support
            Compare Model View Controller Libraries with Highest Quality
            Compare Model View Controller Libraries with Highest Security
            Compare Model View Controller Libraries with Permissive License
            Compare Model View Controller Libraries with Highest Reuse
            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
            over 650 million Knowledge Items
            Find more libraries
            Reuse Solution Kits and Libraries Curated by Popular Use Cases
            Explore Kits

            Save this library and start creating your kit