I am using spring-boot and I have an entity class defined something like this import org.joda.time.LocalDateTime; @Entity public class Project { @Type(type = “org.jadira.usertype.dateandtime….
Tag: spring-boot
Running code after Spring Boot starts
I want to run code after my spring-boot app starts to monitor a directory for changes. I have tried running a new thread but the @Autowired services have not been set at that point. I have been …
Can I manually load @ConfigurationProperties without the Spring AppContext?
Is there any way to load a class marked with @ConfigurationProperties without using a Spring Context directly? Basically I want to reuse all the smart logic that Spring does but for a bean I manually …
Spring Boot + JPA : Column name annotation ignored
I have a Spring Boot application with dependency spring-boot-starter-data-jpa. My entity class has a column annotation with a column name. For example: SQL generated by this created test_name as the columns name. After looking for a solution I have found that spring.jpa.hibernate.naming_strategy=org.hibernate.cfg.EJB3NamingStrategy solved the problem (column name is taken from column annotation). Still, my question is why without naming_strategy set
mvn spring-boot:run doesn’t start spring
ANSWER: I changed the version tag from 0.0.1-SNAPSHOT to 1.0.2.RELEASE and it worked, see answer below. I am following this documentation and have created the Example.java as instructed. When I run …
Spring Boot: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean
I am totally new to Spring and started to do the official guides from this site: https://spring.io/guides I’d like to do this guide: https://spring.io/guides/gs/scheduling-tasks/ I get the following Exception: The application starter class is this: As you can see, the main method contains a commented line. I’ve already done a tutorial, namely this one: https://spring.io/guides/gs/consuming-rest/ It’s up and running. But
Add context path to Spring Boot application
I am trying to set a Spring Boot applications context root programmatically. The reason for the context root is we want the app to be accessed from localhost:port/{app_name} and have all the …