------

[ AD ] Port Monitor ( Try to use a Best WebSite Monitoring Tool )

------



Spring Boot를 통해서, 간단하게 WebApplication을 생성하는
방법을 알아 보자.

                                              원본 : http://projects.spring.io/spring-boot/

 특징

  • Create stand-alone Spring applications
  • Embed Tomcat, Jetty or Undertow directly (no need to deploy WAR files)
  • Provide opinionated 'starter' POMs to simplify your Maven configuration
  • Automatically configure Spring whenever possible
  • Provide production-ready features such as metrics, health checks and externalized configuration
  • Absolutely no code generation and no requirement for XML configuration


Spring프로젝트 여러가지 중에서 한가지...Boot Project


1. 프로젝트 생성

-> Spring -> Spring Project

->Project name -> Template : Finish !

>> 프로젝트 생성 완료


2. pom.xml 수정

*pom.xml설명은 아래쪽 참조.

3. SampleController작성

  * @ResponseBody를 붙임 : 별도의 뷰가 없는 예
- view를 jsp로 한다면, src/main/resource/application.properties에
  spring.view.prefix  = /jsp/
  spring.view.suffix = .jsp
  ==> /jsp/폴더에 jsp파일을 기본뷰로 사용하게 된다. @RequestMapping만 사용하면 된다.
 아래처럼 수정
   


4. 실행

->Project -> Run As -> 7. Maven install 실행

->Project -> Run As -> Spring Boot App 실행

>> 결과 : Console창도 확인을 해 보세요.

* 간단하게 스프링 웹 어플리케이션 작성 완료... 



다른 글 == > 이제는 Spring Boot를 써야할 때다 :

http://start.goodtime.co.kr/2014/10/%EC%9D%B4%EC%A0%9C%EB%8A%94-spring-boot%EB%A5%BC-%EC%8D%A8%EC%95%BC%ED%95%A0-%EB%95%8C%EB%8B%A4/ 

- 수작업으로 초기 셋업하는 과정 없이 간단히 프로젝트를 띄울 수 있다.


다른 사이트 == > https://github.com/spring-projects/spring-boot 다양한 예제

동영상 강의(영문) : http://www.leveluplunch.com/java/tutorials/003-getting-started-with-spring-boot/

슬라이드 자료 : Spring Boot 소개 http://www.slideshare.net/madvirus/spring-boot-42817314



* pom.xml 기타 설정

 

 <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>
  <groupId>org.springframework.samples</groupId>
  <artifactId>SpringBootTestWeb</artifactId>
  <version>0.0.1-SNAPSHOT</version>
 
  <!-- 표준 버젼 모음 -->
  <parent>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-parent</artifactId>
   <version>1.1.5.RELEASE</version>
  </parent>
 
  <dependencies>
   
   <!-- spring-mvc등 웹관련 모듈 자동 설정  -->
   <dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-web</artifactId>
   </dependency>
   
   <!-- spring-data-jpa, JPA, Hibernate관련 모듈 설정, 연관된 spring-orm, 커넥션풀등 모듈설정 -->
   <!--
    <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-data-jpa</artifactId>
    -->
   
    <!-- spring-test , JUnit등 관련 모듈 설정 -->
    <!--
     <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-test</artifactId>
     -->
    
     <!-- 임베디드 톰갯 관련 모듈 설정 -->
     <!--
      spring-boot-starter-tomcat
      -->
    
  </dependencies>
 
</project>


 





'0.일반개발' 카테고리의 다른 글

Spring 4 MVC Hello World Tutorial using maven  (0) 2015.06.05
HttpServlet not found  (0) 2015.06.05
Spring MVC  (0) 2015.04.29
Spring MVC 개념  (0) 2015.04.28
Objective-C / Cocos2d / MVC  (0) 2012.07.06


SpringDynamicMvc_src.zip

맨아래 원본자료가 있으며, 실제 테스트 하면서, 언급되지 않아서 해당 정보를 찾는데,
시간이 소요된 것 같네요.. 이런 부분을 추가를 해 봤습니다..


[Spring]Spring MVC

DispatcherServlet : 최초로 요청을 받아들임, 다른 MVC관련 빈 객체를 담는 컨테이너
Controller :
실제 요청을 처리하는 객체
HandlerMapping : DispatcherServlet
이 받은 요청을 실제로 처리할 컨트롤러를 결정
ModelAndView : Controller
의 요청 처리의 결과물로 사용할 View(page) Model(Data)의 집합
ViewResolver : ModelAndView
정보로 실제 View로 가공하는 작업을 수행
View : Client
에게 응답할 완성품

 


1. Spring MVC 환경 설정 및 예제

1-1. Dynamic web project 클릭후 아래의 그림처럼 next 를 계속 누른다.


 1-2. 아래의 표시된 부분을 체크하고 finish!!

 1-3. maven 속성 적용 후 필요 라이브러리 pom.xml 파일에 아래에 내용 추가 정의



  
   org.springframework
   spring-core
   3.2.8.RELEASE
  
  
   org.springframework
   spring-context
   3.2.8.RELEASE
  
  
   org.springframework
   spring-web
   3.2.8.RELEASE
  
  
   org.springframework
   spring-webmvc
   3.2.8.RELEASE
  
 


1-4. web.xml 파일에 아래의 그림에 표시된 필요없는 부분 삭제

 

1-5. web.xml 파일 설정

  - DispatcherServlet을 웹어플리케이션에 등록(ex: [servletname]-servlet.xml)
  - DispatcherServlet
이 스프링 컨테이너가 되기 위해 사용할 스프링 설정파일 지정


예)


  Spring_MVC

 
 
      
      dispatcher
      
      org.springframework.web.servlet.DispatcherServlet
      
      
           contextConfigLocation
           /WEB-INF/dispatcher-servlet.xml
      
      
      1
 

 
 
      dispatcher
      *.do
 
 





   
    org.springframework.web.context.ContextLoaderListener
   
   

  
  
  
  
  
  


  

 
  encodingFilter
  org.springframework.web.filter.CharacterEncodingFilter
  
   encoding
   EUC-KR
  
 

 
  
  encodingFilter
  
  /*
 


1-6. web.xml 파일에 정의한  /WEB-INF/dispatcher-servlet.xml  파일 생성후 설정

(Spring bean configuration file
형식으로 생성)
  - DispatcherServlet 설정파일에 Controller, HandlerMapping, ViewResolver 빈으로 등록
)



 
  

 
 
  
  
  
    
    
    
  

 

1-7. controller 작성

) 

package controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

//@Controller 에노테이션으로 서블릿 컨테이너에 controller객체를 빈으로 등록

@Controller
public class HelloController {
 
 //controller 클래스의 각 메소드에 처리할 url을 @RequestMapping으로 지정한다
 //이것이 HandlerMapping을 대체함
 @RequestMapping("hello.do")
 public ModelAndView hello(){
  
  ModelAndView modelAndView =new ModelAndView();
  //ModelAndView 객체에 속성and값 추가
  modelAndView.addObject("msg", "hello spring MVC");
  //ModelAndView 객체에 view 파일 셋팅
  modelAndView.setViewName("/jsp/hello.jsp");   // -> "hello"로 수정
  return modelAndView; // ViewResolver에 modelAndview를 리턴 
  }

​
  // 스프링 MVC 컨트롤러 요청처리에서 다양한 반환유형
  // 데이터와 뷰의 정보가 둘다 있는 경우 : ModelAndView
  // 데이터만 있는 경우(뷰의 정보가 없는 경우) : Map, Model등의 반환유형
  // >>> 뷰의 정보는 요청 url에서 확장자를 뗀 값을 viewName으로 사용
  // 뷰의 정보만 있는 경우(데이터의 정보가 없는 경우) : String, View 등의 반환유형
  // >>> 매개변수의 Model객체를 데이터로 사용
  // 둘다 없는 경우 : void
  // >>> 뷰의 정보는 요청 url에서 확장자를 뗀 값을 viewName으로, 매개변수의 Model객체를 데이터로

  @RequestMapping("onlyModel.do")  //return view 정의 안했을때는 onlyModel.jsp 로 간다
  public Map onlyModel() {
   Map model = new HashMap();
   model.put("msg", "모델만 있는 컨트롤러 메소드");
   return model;
  }

  @RequestMapping("onlyViewName.do")
  public String onlyViewName(Model model) {
   model.addAttribute("msg", "ViewName만 있는 컨트롤러 메소드");
   return "onlyViewName";
  }

  @RequestMapping("noInfo.do")
  public void noInfo(Model model) {
   model.addAttribute("msg", "아무정보도 없는 컨트롤러 메소드");
  }

  @RequestMapping("sessionTest.do")
  public String accessSession(HttpSession session) {
   session.setAttribute("sessionVal", "session에 값 넣었따");
   return "sessionTest";
  }

@RequestMapping("paramTest.do")
  public String paramTest(Model model, @RequestParam("num1") int a,
    @RequestParam("num2") int b) {
   model.addAttribute("val", a + b);
   return "paramTest";
  }


  //////////// 아래 Member가 모델 클래스에 있다고 가정했을때

  class Member{
   String id;
   String pw;
   public String getId() {
    return id;
   }
   public void setId(String id) {
    this.id = id;
   }
   public String getPw() {
    return pw;
   }
   public void setPw(String pw) {
    this.pw = pw;
   }
  }
  @RequestMapping("join.do") //join.do?id=kkk&pw=aaa 요청이 들어오면 알아서 member 객체에 들어감
  public String join(Member member)
  {
   System.out.println(member.getId()); // 출력결과 : kkk
   System.out.println(member.getPw()); // 출력결과 : aaa
   return "main";
  }
 }

 1-8. view 작성

)


 
<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>

Insert title here
${msg }

 이클립스에서 테스트시 해당 프로젝트 우클릭>RunAs>RunOnServer 클릭으로 테스트

 결과)

controller 관련 설정은 서블릿컨테이너 설정파일에 설정하고,
모든 서블릿이 공유해야하는 모델, 서비스, DAO 등을 루트컨테이너 설정 파일에 정의하자

 

발췌 : http://exploit_code.blog.me/220136918515

'0.일반개발' 카테고리의 다른 글

HttpServlet not found  (0) 2015.06.05
Spring Boot 프로젝트 생성 예제  (0) 2015.05.13
Spring MVC 개념  (0) 2015.04.28
Objective-C / Cocos2d / MVC  (0) 2012.07.06
cocos2d 기초 강좌 - 기본 함수  (0) 2012.06.01

DispatcherServlet : 최초로 요청을 받아들임, 다른 MVC관련 빈 객체를 담는 컨테이너

HandlerMapping : DispatcherServlet이 받은 요청을 실제로 처리할 컨트롤러를 결정

Controller : 실제 요청을 처리하는 객체



ModelAndView : Controller의 요청 처리의 결과물로 사용할 View(page)와 Model(Data)의 집합


ViewResolver : ModelAndView정보로 실제 View로 가공하는 작업을 수행
View : Client에게 응답할 완성품

cocos2d meets MVC – Implementing simple board game part 2


By BARTEK | Published: 

Introducing model

In the previous part we introduced the View and the Controller. To comply with MVC paradigm we need to add a model which will represent the current state of a game board. Our implementation now should contain the following classes:

1.     GameBoardView - the View,

2.     GameBoardController - the Controller.

3.     GameBoard the Model.

 


 

 

 

GameBoard implementation

Our requirement (described in the first part) is that:

A game board is defined by a number of rows and columns, which may vary for different application levels.

We implement it in the following way:

@interface GameBoard : NSObject {
    NSInteger numberOfRows;
    NSInteger numberOfColumns;
}
 
- (id)initWithRows:(NSInteger)aNumberOfRows columns:(NSInteger)aNumberOfColumns;
 
@property (nonatomic) NSInteger numberOfRows;
@property (nonatomic) NSInteger numberOfColumns;
 
@end

Please notice that the model extends NSObject the model should contain just the state of a game board (and the methods to update this state) we shouldnt put any view related concerns here.

 

 

GameBoardView implementation

We need to modify the View and pass it the Model, we do this in initWithGameBoard method.

@interface GameBoardView : CCNode {
    GameBoard *gameBoard;
}
 
@property (nonatomic, retain) GameBoard *gameBoard;
 
- (id)initWithGameBoard:(GameBoard *)aGameBoard;  // with Model
 
@end

Our implementation of a GameBoardView can look like this (rendering game board spaces omitted to simplify the code):

- (id)initWithGameBoard:(GameBoard *)aGameBoard {
    if ((self = [super init])) {
        // retain gameboard
        self.gameBoard = aGameBoard;
 
        // render gameboard background
        CCSprite *gameboardSprite = [CCSprite spriteWithFile:@"gameboard.png"];
        gameboardSprite.anchorPoint = CGPointMake(0, 0);
 
        [self addChild:gameboardSprite];
 
        // render spaces
        for (int i = 0; i &lt; gameBoard.numberOfRows; i++) {
            for (int j = 0; j &lt; gameBoard.numberOfColumns; j++) {
                // position and render game board spaces
            }
        }
    }
 
    return self;
}

 

 

GameBoardController

Finally the implementation of an init method in the Controller should be updated the View needs to have the GameBoard model injected in its init method so we construct the game board in Controller (just for now) and pass it to the View (later on we will create a game board based on a level definition).

- (id)init {
    if ((self = [super init])) {
 
        // initialize model
        gameBoard = [[GameBoard alloc] initWithRows:7 columns:9];
 
        // initialize view
        view = [[GameBoardView alloc] initWithGameBoard:gameBoard];
 
        [self addChild:view];
    }
 
    return self;
}

 

 

 

 

 

 

 

 

 

 

 

 

 

Handling touches

 

GameBoardView updates

In order to handle touches we need to slightly modify the View. We make it extend CCLayer instead of CCNode to have a possibility to handle touch events inside of it:

@interface GameBoardView : CCLayer {
...
}

The View itself should not be responsible for handling the actions that are results of user interaction with the game board so we will pass it to the Controller using protocol.

@protocol GameBoardViewDelegate
- (void)gameBoard:(GameBoard *)gameBoard touchedAtRow:(int)row column:(int)column;
@end

We also modify the init method of a GameBoardView so we can pass a delegate object that will be responsible for handling the touches:

- (id)initWithGameBoard:(GameBoard *)aGameBoard delegate:(id)aDelegate;

And the implementation is:

- (void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
    UITouch *touch = [touches anyObject];
    CGPoint point = [self convertTouchToNodeSpace:touch];
 
    // calculate row and column touched by the user and call a delegate method
    // ...
    [self.delegate gameBoard:self.gameBoard touchedAtRow:row column:column];
}

 

 

GameBoardController updates

GameBoardController will be responsible for handling user touches, so we need to implement a GameBoardViewDelegate in a GameBoardController:

@interface GameBoardController : CCNode
- (void)gameBoard:(GameBoard *)gameBoard touchedAtRow:(int)row column:(int)column {
    // do the game logic here and update view accordingly
}

The last step is to modify the View initialization in the following way (in init method):

// initialize view
view = [[GameBoardView alloc] initWithGameBoard:gameBoard delegate:self];

 

 

source - 실제 구현한 부분

 

//

//  GameBoard.h

//  Mvc

//

//  Created by James Yu on 12. 7. 6..

//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.

//

 

#import <Foundation/Foundation.h>

 

@interface GameBoard : NSObject {

   

    NSInteger numberOfRows;

    NSInteger numberOfColumns;

}

 

-(id)initWithRows:(NSInteger)aNumberOfRows columns:(NSInteger)aNumberOfColumns;

 

@property (nonatomic) NSInteger numberOfRows;

@property (nonatomic) NSInteger numberOfColumns;

   

 

@end

 

 

//

//  GameBoard.m

//  Mvc

//

//  Created by James Yu on 12. 7. 6..

//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.

//

 

#import "GameBoard.h"

 

@implementation GameBoard

 

@synthesize numberOfRows;

@synthesize numberOfColumns;

 

 

-(id)initWithRows:(NSInteger)aNumberOfRows columns:(NSInteger)aNumberOfColumns

{

    self=[super init];

    if(self) {

    }

    return self;

}

 

@end

 

//

//  GameBoardView.h

//  Mvc

//

//  Created by James Yu on 12. 7. 6..

//  Copyright 2012 __MyCompanyName__. All rights reserved.

//

 

#import <Foundation/Foundation.h>

#import "cocos2d.h"

 

#import "GameBoard.h"

 

 

@protocol GameBoardViewDelegate

-(void)gameBoard:(GameBoard*)gameBoard touchedAtRow:(int)row column:(int)column;

@end

 

// need to modify the View and pass it the Model,

// we do this in initWithGameBoard method.

 

@interface GameBoardView : CCLayer {

   

    GameBoard *gameBoard;

    id<GameBoardViewDelegate> delegate;

}

 

-(id)initWithGameBoard:(GameBoard *)aGameBoard delegate:(id)aDelegate;

 

@property (nonatomic, retain) GameBoard *gameBoard;

@property (nonatomic, retain) id<GameBoardViewDelegate> delegate;

 

@end

 

//

//  GameBoardView.m

//  Mvc

//

//  Created by James Yu on 12. 7. 6..

//  Copyright 2012 __MyCompanyName__. All rights reserved.

//

 

#import "GameBoardView.h"

 

 

@implementation GameBoardView

 

@synthesize gameBoard;

@synthesize delegate;

 

-(id)initWithGameBoard:(GameBoard *)aGameBoard delegate:(id)aDelegate {

   

    self =[super init];

   

    if ( self ) {

 

        self.isTouchEnabled=YES;

       

        // retain gameboard

        self.gameBoard = aGameBoard;

        self.delegate = aDelegate;

       

        // render gameboard background

        CCSprite *gameBoardSprite=

        [CCSprite spriteWithFile:@"icon.png"];

        gameBoardSprite.anchorPoint=CGPointMake(0,0);

        [self addChild:gameBoardSprite];

       

        // render spaces

        for( int i =0; i < gameBoard.numberOfRows; i++) {

            for( int j=0 ; i < gameBoard.numberOfColumns; j++ ) {

                // position and render game board spaces

               

            }

        }

       

    }

    return self;

}

 

-(void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {

   

    NSLog(@"touch");

    //UITouch *touch=[touches anyObject];

    //CGPoint point=[self convertToNodeSpace:touch];

   

    // calculate row and columns touched by the user and call a delegate method

   

    //[self.delegate gameBoard:self.gameBoard touchedAtRow:row column:column];

    [self.delegate gameBoard:self.gameBoard touchedAtRow:1 column:1];

   

}

 

@end

 


 

 

//

//  GameBoardController.h

//  Mvc

//

//  Created by James Yu on 12. 7. 6..

//  Copyright 2012 __MyCompanyName__. All rights reserved.

//

 

#import <Foundation/Foundation.h>

#import "cocos2d.h"

 

#import "GameBoardView.h"

 

#import "GameBoard.h"

 

@interface GameBoardController : CCNode<GameBoardViewDelegate> {

   

    GameBoardView   *view;

    GameBoard       *gameBoard;

}

 

-(void)gameBoard:(GameBoard*)gameBoard touchedAtRow:(int)row column:(int)column;

 

@end

 

//

//  GameBoardController.m

//  Mvc

//

//  Created by James Yu on 12. 7. 6..

//  Copyright 2012 __MyCompanyName__. All rights reserved.

//

 

#import "GameBoardController.h"

 

// is responsible for initializing the view.

// also holds a reference to GameBoardView for future needs.

 

@implementation GameBoardController

 

-(id)init {

   

    self =[super init];

   

    if ( self ) {

        

        //view = [GameBoardView node];

        //[self addChild:view];

           

        // initialize model

        gameBoard=[[GameBoard alloc] initWithRows:7 columns:9];

       

        // initialize view

        view = [[GameBoardView alloc] initWithGameBoard:gameBoard delegate:self];

       

        [self addChild:view];

       

        Protocol *p=@protocol(GameBoardViewDelegate);

        if ( [self conformsToProtocol:p] == YES ) {

            NSLog(@"app supports delegate protocol");

        }

       

    }

    return self;

}

 

-(void)gameBoard:(GameBoard*)gameBoard touchedAtRow:(int)row column:(int)column {

   

    NSLog(@"touch row[%d] column[%d]", row, column);

   

}

@end

 

'0.일반개발' 카테고리의 다른 글

Spring MVC  (0) 2015.04.29
Spring MVC 개념  (0) 2015.04.28
cocos2d 기초 강좌 - 기본 함수  (0) 2012.06.01
Xcode 4.0 시뮬레이터에서 리소스가 반영되지 않을떄.  (0) 2012.05.30
Texture Packer  (0) 2012.05.25




















'0.일반개발' 카테고리의 다른 글

Spring MVC 개념  (0) 2015.04.28
Objective-C / Cocos2d / MVC  (0) 2012.07.06
Xcode 4.0 시뮬레이터에서 리소스가 반영되지 않을떄.  (0) 2012.05.30
Texture Packer  (0) 2012.05.25
게시판 만들기1 - CodeIgniter 2.1.0  (0) 2012.02.01

-Xcode 4.0 시뮬레이터에서 리소스가 반영되지 않을떄.-

iPhone Simulator에서 리소스가 변경된 것이 반영되지 않을떄..


case 1 ) SQLite3 DB파일 복사시

FROM: $(HOME)/Library/Application Support/iPhone Simulator/5.1/Application/(GUID)/(Name).app/(test).db

TO : $(HOME)/Library/Application Support/iPhone Simulator/5.1/Application/(GUID)/Documents/(test).db


Project의 Resource폴더를 변경해도 시뮬레이터에 반영되지 않는 이유는 Cache때문이므로..

Cache폴더를 지워야 한다..

$(HOME)/Library/Application Support/iPhone Simulator/5.1/Application/

아래의 해당 (GUID) 폴더 전체를 삭제, 또는 모든 (GUID)를 삭제 한다.


case 2 ) png파일의 이름이 같은데, 그림이 변경된경우에 반영되지 않을떄



'0.일반개발' 카테고리의 다른 글

Objective-C / Cocos2d / MVC  (0) 2012.07.06
cocos2d 기초 강좌 - 기본 함수  (0) 2012.06.01
Texture Packer  (0) 2012.05.25
게시판 만들기1 - CodeIgniter 2.1.0  (0) 2012.02.01
안드로이드 소스  (0) 2011.10.16

#Run TexturePacker ( Windows )



# Add – sprite images

> 형식 : 이름+순서.png  ( 숫자는 1번부터 시작)


 

 

# Setting - Output 설정


Data file           : 경로/이름.plist

Texture format   : Compressed PVR(.pvr.ccz)

Image format     : 8888<->4444   ( 16-bit pixel format : RGBA4444 )

Dithering          : FloydSteinberg+Alpha ( with 4444  )

( Large images, worst quality - FloydSteinberg with RGB565 )

Texture file        : 경로/이름.pvr.ccz

 

 

 


# Publish – File Menu

Data file, Texture file 생성

게시판 만들기1 - CodeIgniter 2.1.0
총건수 출력하기/입력 화면/입력
[사전 준비 사항]
1. CodeIgniter 설치
2. MySQL DB 연결 구성 완료 : /application/config/database.php
3. 기본 구성 : /application/config/config.php
[가.순서]
0. Naming
1. Table 만들기
2. Model 만들기
3. Control 만들기
4. View 만들기
[나.기본 골격 구성]
0. Naming
코드명 : SimpleBbs
1. Table 만들기
2. Model 만들기
3. Control 만들기
// /application/controllers/SimpleBbs.php
4. ListView 만들기
총건수 :


5. WriteView 만들기


http://imagine9.tistory.com/80

간혹.. 패키지를 쓸 줄 모르다보니 어떻게 작성되었는지 정말 궁금할 때가 있다.
물론 소스는 구글 코드 검색하면 금방 나오니까 찾아 보는건 문제 없었는데,
매번 검색해서 찾아들어가고, 레퍼런스 찾기는 더 힘들었지..

아.. 하다보면 정말 불편했었;;
몰랐으니까..ㅎㅎ;;
요기에 바로 소스가 뜨고 검색도 되면 정말 편할거 아냐?ㅋ


일단 소스 코드를 받자.

저거 따라서 받았나?
난 그랬다가 그냥 개고생;ㅋ

일단 윈도에선 어떻게 하는지 몰라서, 윈도-리눅 하드 공유시키고,
curl이 잘 안돼서 wget으로 repo 받아서
겨우겨우 sync하는데 한시간은 걸린듯.ㅋ

그냥 여기 들어가보자.


개발하고자 하는 버젼에 적절한 태그를 골라서 클릭.


스냅샷을 다운받자고나~ 그냥 다운 받아진다.ㅋ


다운받은 tar.gz 를 열고 들어가보면, (참고로 알집은 이거 잘 못푼다. 다른거 쓰자-_-)
platform/framework/base 를 기준으로 이하 소스들이
탐스럽게(?) 모여있는 것을 확인할 수 있다.

기본적인건 core/java/android 아래에 있는 것들이다.

이클립스의 자바는 원래 jar 라이브러리에 Attach Source 기능을 지원하는데,
안드로이드 소스는 연결이 허용되어 있지 않은 상태다(이미 특정 위치가 지정되어서 그렇다던데..)

그래서 이걸 특정 위치에 복사해 주어야 하는데,
그게 SDK 아래 android.jar 파일 있는 곳.

여기에 sources 라는 폴더를 만들고 android 부터 복사해 넣어주자.
즉, android 2.2 의 경우.
%ANDROID_SDK%/platforms/android-8/sources/android/
폴더에 각 소스들이 자리하면 된다는 얘기.

파일들을 정확한 위치에 복사해 주고, 프로젝트에서 refresh 를 한 번 하자.
그리고 확인해 보면.. 짜잔~


core 뿐 아니라 Telephony 나 graphics 등 다른 패키지의 소스들도 있으니
필요할 경우 복사해 주면 이클립스에서 바로바로 확인이 가능하다.

마구마구 검색 해 주겠어! 훗.

- 끗 -

참고 사이트

윈도 아니고 리눅스면 심볼릭 링크로도 충분 : http://cranix.net/321



주로 노트북에서 생기는 플래시 10.3 버그

[발생시기]

2011.05.** 경

[사용환경]

- Internet Explorer 9 사용시

- Adobe Flash Player 10.3.*.* 패치후

- Intel HD Graphics 사용

[버그 증상]

- Flash사용하는 웹사이트 방문시, Flash가 좌측 상단에 표시되는 문제


[해결 방안]

- Intel HD Graphics 8.15.*.* 의 설치된 상위 버전으로 업데이트

- Internet Explorer 9 버젼 : 해당 옵션을 설정할 것

: 인터넷 옵션->고급->가속그래픽(v GPU 랜더링 대신 소프트웨서 랜더링 사용)

'0.일반개발' 카테고리의 다른 글

게시판 만들기1 - CodeIgniter 2.1.0  (0) 2012.02.01
안드로이드 소스  (0) 2011.10.16
c# 가계부  (0) 2011.06.01
<c# COM 추가 : Project Add Reference >  (0) 2011.05.26
C# DataGridView 속성 변경하기  (0) 2011.05.26

+ Recent posts