Merge pull request #9255 from sampada07/JAVA-913
JAVA-913: migrate parent-boot-1 articles to parent-boot-2
This commit is contained in:
		
						commit
						f263ebb45e
					
				| @ -10,9 +10,9 @@ | ||||
| 
 | ||||
|     <parent> | ||||
|         <groupId>com.baeldung</groupId> | ||||
|         <artifactId>parent-boot-1</artifactId> | ||||
|         <artifactId>parent-boot-2</artifactId> | ||||
|         <version>0.0.1-SNAPSHOT</version> | ||||
|         <relativePath>../parent-boot-1</relativePath> | ||||
|         <relativePath>../parent-boot-2</relativePath> | ||||
|     </parent> | ||||
| 
 | ||||
|     <dependencies> | ||||
|  | ||||
| @ -1,11 +1,14 @@ | ||||
| package com.baeldung; | ||||
| 
 | ||||
| import org.apache.shiro.SecurityUtils; | ||||
| import org.apache.shiro.authc.*; | ||||
| import org.apache.shiro.authc.AuthenticationException; | ||||
| import org.apache.shiro.authc.IncorrectCredentialsException; | ||||
| import org.apache.shiro.authc.LockedAccountException; | ||||
| import org.apache.shiro.authc.UnknownAccountException; | ||||
| import org.apache.shiro.authc.UsernamePasswordToken; | ||||
| import org.apache.shiro.mgt.DefaultSecurityManager; | ||||
| import org.apache.shiro.mgt.SecurityManager; | ||||
| import org.apache.shiro.realm.Realm; | ||||
| import org.apache.shiro.realm.text.IniRealm; | ||||
| import org.apache.shiro.session.Session; | ||||
| import org.apache.shiro.subject.Subject; | ||||
| import org.slf4j.Logger; | ||||
|  | ||||
| @ -1,16 +1,24 @@ | ||||
| package com.baeldung; | ||||
| 
 | ||||
| import org.apache.shiro.authc.*; | ||||
| import java.sql.Connection; | ||||
| import java.sql.SQLException; | ||||
| import java.util.Arrays; | ||||
| import java.util.Collection; | ||||
| import java.util.HashMap; | ||||
| import java.util.HashSet; | ||||
| import java.util.Map; | ||||
| import java.util.Set; | ||||
| 
 | ||||
| import org.apache.shiro.authc.AuthenticationException; | ||||
| import org.apache.shiro.authc.AuthenticationInfo; | ||||
| import org.apache.shiro.authc.AuthenticationToken; | ||||
| import org.apache.shiro.authc.SimpleAuthenticationInfo; | ||||
| import org.apache.shiro.authc.UnknownAccountException; | ||||
| import org.apache.shiro.authc.UsernamePasswordToken; | ||||
| import org.apache.shiro.authz.AuthorizationInfo; | ||||
| import org.apache.shiro.authz.SimpleAuthorizationInfo; | ||||
| import org.apache.shiro.realm.jdbc.JdbcRealm; | ||||
| import org.apache.shiro.subject.PrincipalCollection; | ||||
| import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | ||||
| 
 | ||||
| import java.sql.Connection; | ||||
| import java.sql.SQLException; | ||||
| import java.util.*; | ||||
| 
 | ||||
| public class MyCustomRealm extends JdbcRealm { | ||||
| 
 | ||||
|  | ||||
| @ -1,14 +1,15 @@ | ||||
| package com.baeldung.shiro.permissions.custom; | ||||
| 
 | ||||
| import com.baeldung.MyCustomRealm; | ||||
| import org.apache.shiro.SecurityUtils; | ||||
| import org.apache.shiro.authc.*; | ||||
| import org.apache.shiro.authc.AuthenticationException; | ||||
| import org.apache.shiro.authc.IncorrectCredentialsException; | ||||
| import org.apache.shiro.authc.LockedAccountException; | ||||
| import org.apache.shiro.authc.UnknownAccountException; | ||||
| import org.apache.shiro.authc.UsernamePasswordToken; | ||||
| import org.apache.shiro.config.Ini; | ||||
| import org.apache.shiro.mgt.DefaultSecurityManager; | ||||
| import org.apache.shiro.mgt.SecurityManager; | ||||
| import org.apache.shiro.realm.Realm; | ||||
| import org.apache.shiro.realm.text.IniRealm; | ||||
| import org.apache.shiro.session.Session; | ||||
| import org.apache.shiro.subject.Subject; | ||||
| import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | ||||
|  | ||||
| @ -11,9 +11,9 @@ | ||||
| 
 | ||||
|     <parent> | ||||
|         <groupId>com.baeldung</groupId> | ||||
|         <artifactId>parent-boot-1</artifactId> | ||||
|         <artifactId>parent-boot-2</artifactId> | ||||
|         <version>0.0.1-SNAPSHOT</version> | ||||
|         <relativePath>../parent-boot-1</relativePath> | ||||
|         <relativePath>../parent-boot-2</relativePath> | ||||
|     </parent> | ||||
| 
 | ||||
|     <dependencies> | ||||
| @ -28,9 +28,6 @@ | ||||
|         <dependency> | ||||
|             <groupId>org.projectlombok</groupId> | ||||
|             <artifactId>lombok</artifactId> | ||||
|             <version>${lombok.version}</version> | ||||
|             <!-- version is explicit here because the one provided with the current spring-boot-starter-parent has a bug in NetBeans; can be removed if spring-boot-starter-parent is  | ||||
|                 upgraded --> | ||||
|         </dependency> | ||||
|         <dependency> | ||||
|             <groupId>com.stripe</groupId> | ||||
|  | ||||
| @ -13,4 +13,27 @@ public class ChargeRequest { | ||||
|     private Currency currency; | ||||
|     private String stripeEmail; | ||||
|     private String stripeToken; | ||||
|     public String getDescription() { | ||||
|         return description; | ||||
|     } | ||||
|     public int getAmount() { | ||||
|         return amount; | ||||
|     } | ||||
|     public Currency getCurrency() { | ||||
|         return currency; | ||||
|     } | ||||
|     public String getStripeEmail() { | ||||
|         return stripeEmail; | ||||
|     } | ||||
|     public String getStripeToken() { | ||||
|         return stripeToken; | ||||
|     } | ||||
|     public void setDescription(String description) { | ||||
|         this.description = description; | ||||
|     } | ||||
|     public void setCurrency(Currency currency) { | ||||
|         this.currency = currency; | ||||
|     } | ||||
|      | ||||
|      | ||||
| } | ||||
|  | ||||
							
								
								
									
										2
									
								
								stripe/src/main/resources/application.properties
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								stripe/src/main/resources/application.properties
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,2 @@ | ||||
| STRIPE_SECRET_KEY= | ||||
| STRIPE_PUBLIC_KEY= | ||||
| @ -1,7 +1,7 @@ | ||||
| <!DOCTYPE html> | ||||
| <html> | ||||
|     <head> | ||||
|         <meta http-equiv="refresh" content="0; url=/checkout.html" /> | ||||
|         <meta http-equiv="refresh" content="0; url=/checkout" /> | ||||
|     </head> | ||||
|     <body></body> | ||||
| </html> | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user