0

after a "maven clean" my spring boot project doesn't compile anymore

RunAs --> Spring Boot App

Impossible to find or load the main class com.in28minutes.springboot.rest.example.springboot2restservicebasic.SpringBoot2RestServiceBasicApplication

so from the terminal: mvn spring-boot:run (or spring-boot:repackage )

Compilation failure
[ERROR] /D:/eclipse-workspace/spring-boot-2-rest-service-basic/spring-boot-2-rest-service-basic/src/main/java/com/in28minutes/springboot/rest/example/springboot2restservicebasic
/api/StudentResource.java:[18,45] package net.bytebuddy.implementation.bytecode does not exist

pom.xml

...
<dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>
..
pinale
  • 2,060
  • 6
  • 38
  • 72

1 Answers1

1

Have you put the dependency below in your project's pom.xml?

```xml
    <dependency>
        <groupId>net.bytebuddy</groupId>
        <artifactId>byte-buddy</artifactId>
        <version>1.7.11</version>
    </dependency>
```

version can be another you want.

Xian Shu
  • 672
  • 6
  • 8
  • adding this dependecy the program works! but why did it work before? i edited the post with my previous pom (that worked) – pinale May 30 '18 at 10:05
  • Sorry, the codes you submitted are so simple and few that I can't get the idea. – Xian Shu May 30 '18 at 10:10