This file contains 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"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<artifactId>monolithic</artifactId> | |
<packaging>war</packaging> | |
<parent> |
This file contains 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
import java.io.IOException; | |
import java.util.Properties; | |
import org.apache.commons.lang3.StringUtils; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.beans.factory.config.YamlPropertiesFactoryBean; | |
import org.springframework.core.env.PropertiesPropertySource; | |
import org.springframework.core.env.PropertySource; | |
import org.springframework.core.io.ClassPathResource; |
This file contains 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
import java.io.IOException; | |
import java.util.Properties; | |
import org.apache.commons.lang3.StringUtils; | |
import org.springframework.beans.factory.config.YamlPropertiesFactoryBean; | |
import org.springframework.core.env.PropertiesPropertySource; | |
import org.springframework.core.env.PropertySource; | |
import org.springframework.core.io.Resource; | |
import org.springframework.core.io.support.EncodedResource; | |
import org.springframework.core.io.support.PropertySourceFactory; |
This file contains 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
@SpringBootApplication | |
public class Application extends SpringBootServletInitializer { | |
public static void main(String[] args) { | |
SpringApplication.run(Application.class, args); | |
} | |
@Override | |
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { | |
// Updating javax.xml.bind.JAXBContextFactory to make use of com.sun.xml.bind.v2.ContextFactory from our packaged WAR | |
System.setProperty("javax.xml.bind.JAXBContextFactory", "com.sun.xml.bind.v2.ContextFactory"); |
This file contains 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
@Primary | |
@Bean | |
public LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource) { | |
LocalContainerEntityManagerFactoryBean emfBean = new LocalContainerEntityManagerFactoryBean(); | |
emfBean.setJpaVendorAdapter(new HibernateJpaVendorAdapter()); | |
emfBean.setDataSource(dataSource); | |
// Other configurations | |
} |
This file contains 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
@SpringBootApplication | |
public class Application extends SpringBootServletInitializer { | |
public static void main(String[] args) { | |
SpringApplication.run(Application.class, args); | |
} | |
@Override | |
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { | |
return application.sources(Application.class); | |
} |
This file contains 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
package my.beanBag; | |
@ManagedBean(name = "mrBean") | |
@RequestScoped | |
public class MrBean implements ActionListener { | |
private String type; | |
public void triggerActionListener() { | |
System.out.println("MrBean is called by buttons' actionListener."); | |
} |
This file contains 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
String requestURI = request.getRequestURI(); | |
String queryString = request.getQueryString(); | |
String encodedURL = URLEncoder.encode(requestURI + "?" + queryString, "UTF-8"); | |
response.sendRedirect(request.getContextPath() + "/login.xhtml?originalURL=" + encodedURL); |
This file contains 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
@Named(value = "userSession") | |
@SessionScoped | |
public class UserSessionBean implements Serializable { | |
private SocialAuthManager manager; | |
private String originalURL; | |
private String providerID; | |
private Profile profile; | |
public UserSessionBean() { ... } | |
This file contains 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
-Djavax.net.ssl.keyStorePassword=newpass | |
-Djavax.net.ssl.trustStorePassword=newpass |
NewerOlder