// Path: src/main/java/com/jipasoft/domain/AbstractAuditEntity.java
// @Data
// @MappedSuperclass
// public abstract class AbstractAuditEntity implements Serializable {
// 
// 	private static final long serialVersionUID = 1L;
// 
// 	@NotNull
// 	@Field("created_by")
// 	@Size(min = 1, max = 50)
// 	@Column(updatable = false)
// 	@CreatedBy
// 	private String createdBy;
// 
// 	@Field("created_date")
// 	@Column(nullable = false)
// 	@CreatedDate
// 	private ZonedDateTime createdDate = ZonedDateTime.now();
// 
// 	@Field("last_modified_by")
// 	@Size(max = 50)
// 	@LastModifiedBy
// 	private String lastModifiedBy;
// 
// 	@Field("last_modified_date")
// 	@LastModifiedDate
// 	private ZonedDateTime lastModifiedDate;
// }
// 
// Path: src/main/java/com/jipasoft/service/Services.java
// public interface Services {
// 
// }
// 
// Path: src/main/java/com/jipasoft/util/Profiles.java
// public class Profiles {
// 	public static final String H2 = "h2";
// 	public static final String POSTGRES = "postgres";
// 	public static final String MYSQL = "mysql";
// 	public static final String MONGO = "mongo";
// 	public static final String EMAIL = "email";
// 	public static final String HEROKU = "heroku";
// 	public static final String ASPECT = "aspect";
// }
// 
// Path: src/main/java/com/jipasoft/web/Controllers.java
// public interface Controllers {
// 
// }


import java.util.Locale;
import javax.inject.Inject;
import javax.sql.DataSource;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties;
import org.springframework.boot.autoconfigure.mail.MailProperties;
import org.springframework.boot.autoconfigure.mongo.MongoProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.Import;
import org.springframework.core.env.Environment;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.web.servlet.LocaleResolver;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.i18n.CookieLocaleResolver;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
import com.github.mongobee.Mongobee;
import com.jipasoft.domain.AbstractAuditEntity;
import com.jipasoft.service.Services;
import com.jipasoft.util.Profiles;
import com.jipasoft.web.Controllers;
import com.mongodb.Mongo;
import liquibase.integration.spring.SpringLiquibase;
import lombok.extern.slf4j.Slf4j;

	/**
	 * i18n bean support for switching locale through a request param. <br />
	 * Users who are authenticated can change their default locale to another
	 * when they pass in a<br />
	 * url (http://example.com/&lt;contextpath&gt;/<em>lang=&lt;locale&gt;</em>)
	 * 
	 * @return
	 */
	@Bean
	public LocaleChangeInterceptor localeChangeInterceptor() {
		LocaleChangeInterceptor lci = new LocaleChangeInterceptor();
		lci.setParamName("lang");
		return lci;
	}

	/**
	 * SQL database migration. Liquibase keeps track of database changes
	 * 
	 * @param dataSource
	 * @return
	 */
	@Bean
	public SpringLiquibase liquibase(DataSource dataSource) {
		SpringLiquibase liquibase = new SpringLiquibase();
		liquibase.setDataSource(dataSource);
		liquibase.setChangeLog(liquibaseProperties.getChangeLog());
		liquibase.setContexts(liquibaseProperties.getContexts());
		liquibase.setDefaultSchema(liquibaseProperties.getDefaultSchema());
		liquibase.setDropFirst(liquibaseProperties.isDropFirst());
		// When the mongo profile is active, the migration is not required

// Path: src/main/java/com/jipasoft/domain/AbstractAuditEntity.java
// @Data
// @MappedSuperclass
// public abstract class AbstractAuditEntity implements Serializable {
// 
// 	private static final long serialVersionUID = 1L;
// 
// 	@NotNull
// 	@Field("created_by")
// 	@Size(min = 1, max = 50)
// 	@Column(updatable = false)
// 	@CreatedBy
// 	private String createdBy;
// 
// 	@Field("created_date")
// 	@Column(nullable = false)
// 	@CreatedDate
// 	private ZonedDateTime createdDate = ZonedDateTime.now();
// 
// 	@Field("last_modified_by")
// 	@Size(max = 50)
// 	@LastModifiedBy
// 	private String lastModifiedBy;
// 
// 	@Field("last_modified_date")
// 	@LastModifiedDate
// 	private ZonedDateTime lastModifiedDate;
// }
// 
// Path: src/main/java/com/jipasoft/service/Services.java
// public interface Services {
// 
// }
// 
// Path: src/main/java/com/jipasoft/util/Profiles.java
// public class Profiles {
// 	public static final String H2 = "h2";
// 	public static final String POSTGRES = "postgres";
// 	public static final String MYSQL = "mysql";
// 	public static final String MONGO = "mongo";
// 	public static final String EMAIL = "email";
// 	public static final String HEROKU = "heroku";
// 	public static final String ASPECT = "aspect";
// }
// 
// Path: src/main/java/com/jipasoft/web/Controllers.java
// public interface Controllers {
// 
// }


// Path: src/main/java/com/jipasoft/config/Application.java
import java.util.Locale;
import javax.inject.Inject;
import javax.sql.DataSource;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties;
import org.springframework.boot.autoconfigure.mail.MailProperties;
import org.springframework.boot.autoconfigure.mongo.MongoProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.Import;
import org.springframework.core.env.Environment;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.web.servlet.LocaleResolver;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.i18n.CookieLocaleResolver;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
import com.github.mongobee.Mongobee;
import com.jipasoft.domain.AbstractAuditEntity;
import com.jipasoft.service.Services;
import com.jipasoft.util.Profiles;
import com.jipasoft.web.Controllers;
import com.mongodb.Mongo;
import liquibase.integration.spring.SpringLiquibase;
import lombok.extern.slf4j.Slf4j;

	/**
	 * i18n bean support for switching locale through a request param. <br />
	 * Users who are authenticated can change their default locale to another
	 * when they pass in a<br />
	 * url (http://example.com/&lt;contextpath&gt;/<em>lang=&lt;locale&gt;</em>)
	 * 
	 * @return
	 */
	@Bean
	public LocaleChangeInterceptor localeChangeInterceptor() {
		LocaleChangeInterceptor lci = new LocaleChangeInterceptor();
		lci.setParamName("lang");
		return lci;
	}

	/**
	 * SQL database migration. Liquibase keeps track of database changes
	 * 
	 * @param dataSource
	 * @return
	 */
	@Bean
	public SpringLiquibase liquibase(DataSource dataSource) {
		SpringLiquibase liquibase = new SpringLiquibase();
		liquibase.setDataSource(dataSource);
		liquibase.setChangeLog(liquibaseProperties.getChangeLog());
		liquibase.setContexts(liquibaseProperties.getContexts());
		liquibase.setDefaultSchema(liquibaseProperties.getDefaultSchema());
		liquibase.setDropFirst(liquibaseProperties.isDropFirst());
		// When the mongo profile is active, the migration is not required

		if (env.acceptsProfiles(Profiles.MONGO))
