This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Service | |
@Profile("default") | |
public class DatabaseLoader { | |
private final PageRepository pageRepository; | |
private final PortalRepository portalRepository; | |
@Autowired | |
public DatabaseLoader(PageRepository pageRepository, PortalRepository portalRepository) { | |
this.pageRepository = pageRepository; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring.jpa.hibernate.ddl-auto=none | |
spring.datasource.url=jdbc:mysql://localhost/test | |
spring.datasource.username= | |
spring.datasource.password= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring.datasource.jndi-name=java:jboss/datasources/MySQLDataSource |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface PageRepository extends CrudRepository<Page, Long> { | |
} | |
public interface PortalRepository extends CrudRepository<Portal, Long> { | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
public class Portal extends AbstractPersistable<Long> { | |
private String name; | |
@OneToMany(mappedBy = "portal", cascade = CascadeType.ALL) | |
private List<Page> pages; | |
... | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
public class Page extends AbstractPersistable<Long> { | |
private String name; | |
@ManyToOne | |
private Portal portal; | |
... | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Target(ElementType.TYPE) | |
@Retention(RetentionPolicy.RUNTIME) | |
@Profile("default") | |
public @interface Dev { | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java -jar target/configuration-with-spring-boot-0.0.1-SNAPSHOT.war --logging.config=backbase-logback.xml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<include resource="org/springframework/boot/logging/logback/base.xml"/> | |
<logger name="com.backbase" level="INFO"/> | |
</configuration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java -jar target/configuration-with-spring-boot-0.0.1-SNAPSHOT.war --spring.config.name=backbase |