Spring boot doesn't package files into jar

Don Quixote

I am writing a springboot application which uses mybatis for persistence. I am trying to build using gradlew.sh (a gradle builder shell). The directory structure is like the following

MyApp

└── src

    └── main

         └── java

└── resources-dev

    └── org
        └── myapp
            └── mappers

The mappers directory contains xml mappers for mybatis. When I run ./gradlew.sh , neither the xml files nor any other non-java file is packaged into my jar. what am I missing?

Dave Syer

The conventional location for classpath resources is "src/main/resources". If you stick to the convention (from Gradle not from Spring) you will have an easier time, although I'm sure there is a way to customize the build config if you read the Gradle docs.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Spring boot doesn't package files into jar

From Dev

spring-boot-maven-plugin doesn't create fat jar

From Dev

Spring Boot JAR doesn't contain classes in src folder

From Dev

Spring Boot test doesn't find bean from sibling package

From Dev

Spring Boot integration tests doesn't read properties files

From Dev

Spring Boot package web application to .jar

From Dev

Spring Boot package web application to .jar

From Dev

Spring Boot generates the smallest executable jar package

From Dev

Spring boot questions on WAR/JAR files

From Dev

Spring Boot - how to war package credential files?

From Dev

Spring Boot - custom error page doesn't show up when the app is started in a standalone way (java -jar)

From Dev

Bundling Java (JRE) into a spring-boot package/jar?

From Dev

Unable to package my Spring boot application as a runnable fat Jar

From Dev

Spring ResourceLoader doesn't find resources in JAR

From Dev

Neo4j-Ogm with Spring Boot: Classpath scanning doesn't find DomainEntities when deployed as runnable jar

From Dev

Why does Maven + Spring Boot create huge jar-files?

From Dev

Gradle build: Exclude resources files from Spring Boot Jar file

From Dev

Why does Maven + Spring Boot create huge jar-files?

From Dev

Having configuration files outside jar file in Spring Boot

From Dev

package-install doesn't load the package's files

From Dev

Spring Boot doesn't use datasource properties

From Dev

Spring Boot doesn't use CommonsMultipartResolver?

From Dev

Mockito doesn't mocking with @PreAuthorize and Spring Boot

From Dev

Spring boot @Qualifier doesn't work with datasources

From Dev

Spring Boot doesn't work on JBoss

From Dev

Spring boot @Transactional doesn't rollback

From Dev

Spring Boot doesn't create tables in Postgres

From Dev

Gradle artifactoryPublish won't deploy .jar file generated by spring boot

From Dev

I can't run a spring boot jar on windows

Related Related

  1. 1

    Spring boot doesn't package files into jar

  2. 2

    spring-boot-maven-plugin doesn't create fat jar

  3. 3

    Spring Boot JAR doesn't contain classes in src folder

  4. 4

    Spring Boot test doesn't find bean from sibling package

  5. 5

    Spring Boot integration tests doesn't read properties files

  6. 6

    Spring Boot package web application to .jar

  7. 7

    Spring Boot package web application to .jar

  8. 8

    Spring Boot generates the smallest executable jar package

  9. 9

    Spring boot questions on WAR/JAR files

  10. 10

    Spring Boot - how to war package credential files?

  11. 11

    Spring Boot - custom error page doesn't show up when the app is started in a standalone way (java -jar)

  12. 12

    Bundling Java (JRE) into a spring-boot package/jar?

  13. 13

    Unable to package my Spring boot application as a runnable fat Jar

  14. 14

    Spring ResourceLoader doesn't find resources in JAR

  15. 15

    Neo4j-Ogm with Spring Boot: Classpath scanning doesn't find DomainEntities when deployed as runnable jar

  16. 16

    Why does Maven + Spring Boot create huge jar-files?

  17. 17

    Gradle build: Exclude resources files from Spring Boot Jar file

  18. 18

    Why does Maven + Spring Boot create huge jar-files?

  19. 19

    Having configuration files outside jar file in Spring Boot

  20. 20

    package-install doesn't load the package's files

  21. 21

    Spring Boot doesn't use datasource properties

  22. 22

    Spring Boot doesn't use CommonsMultipartResolver?

  23. 23

    Mockito doesn't mocking with @PreAuthorize and Spring Boot

  24. 24

    Spring boot @Qualifier doesn't work with datasources

  25. 25

    Spring Boot doesn't work on JBoss

  26. 26

    Spring boot @Transactional doesn't rollback

  27. 27

    Spring Boot doesn't create tables in Postgres

  28. 28

    Gradle artifactoryPublish won't deploy .jar file generated by spring boot

  29. 29

    I can't run a spring boot jar on windows

HotTag

Archive