1. 이클립스에서 파이썬 설치

① 아나콘다 다운로드(파이썬 라이브러리)

www.anaconda.com/

 

Anaconda | The World's Most Popular Data Science Platform

Anaconda is the birthplace of Python data science. We are a movement of data scientists, data-driven enterprises, and open source communities.

www.anaconda.com

product - individual Edition

 

Python 3.8 : 64-Bit Graphical Installer (457 MB) Download

 

Anaconda3-2020.11-Windows-x86_64.exe 관리자 권한으로 실행

 

C:\anaconda3 경로에 설치

 

Add Anaconda3 to my PATH environment variable Uncheck

 

 

② PyDev 설치

 

eclipse - help - eclipse market place - PyDev 검색 - install

 

general - workspace / Web - CSS/HTML/JSP에서 UTF-8로 변경

 

Window - Preferences - PyDev - Interpreters - Phython InterPreter - Browse for python/pypy.exe - C:\anaconda3\Phython.exe 선택 - apply

 

③ 가상환경 설치
시작 - anaconda - anaconda prompt 실행
conda create --name test python=3.7 anaconda 입력
가상환경 활성화 명령 : activate test
가상환경 비활성화 명령 : conda deactivate test

 

④ 주피터 실행 (웹상에 실행)
cd C:\work\psou
python aa.py

jupyter notebook
new - python3

 

⑤ colab

colab.research.google.com/notebooks/intro.ipynb

 

Google Colaboratory

 

colab.research.google.com

 

⑥ 프로젝트 시작

File - New - PyDev - 프로젝트명 입력, 3.8, Python 선택

[목차]

1. Spring 환경구축
* 이클립스에 연동
* 라이브러리 로딩방법
① maven을 사용하지 않고 spring lib 파일을 직접 다운로드
② Maven, Gradle


 

[내용]

1. Spring 환경구축

* 이클립스에 연동

 

[eclipse] - [help] - [eclipse marketplace] - [find : spring] - [Spring Tools 3 Add-On for Spring Tools 4 3.9.15 RELEASE] download


* 라이브러리 로딩방법

 

① maven을 사용하지 않고 spring lib 파일을 직접 다운로드

 framwork download

maven.springframework.org/release/org/springframework/spring/5.0.5.RELEASE/

 

Index of release/org/springframework/spring/5.0.5.RELEASE

 

maven.springframework.org

 => [spring-framework-5.0.5.RELEASE-dist.zip] Download

 

 라이브러리 등록

[File] - [New] - [New Spring Legacy Project] - [Simple java] check - [next] - [Library] tab - [Add jar] - [spring-framework-5.0.5.RELEASE\libs] 선택

 

③ bean xml 파일에 bean 등록

프로젝트의 [src] 오른쪽 클릭 - [New] - [Spring Bean Configuration file] - xml파일명 입력 - [finish]

<beans>
	<bean id="mes" class="pack.Message1" />
</beans>

④ getBean

ApplicationContext context = new ClassPathXmlApplicationContext("init.xml");
MessageInter inter2 = (MessageInter)context.getBean("mes");
inter2.sayHello("양길동");
// Spring이 객체를 Singletone으로 생성하여 줌.

 

② Maven, Gradle - 주로 사용

 - 외부에서 로딩
 - 프로젝트, 라이브러리 관리

 

① maven 프로젝트 생성

[New] - [Maven Project] - [create a simple project] check - [Group id], [Atifact id] 입력 - [finish]

 

pom.xml파일 수정

<project>
	<properties>
		<!-- Generic properties -->
		<java.version>1.8</java.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<!-- Spring -->
		<spring-framework.version>5.0.0.RELEASE</spring-framework.version>
		<!-- => 원하는 버전정보 입력 -->
		<!-- Mybatis -->
		<mybatis.version>3.2.3</mybatis.version>
	</properties>
	<dependencies>
		<!-- Spring and Transactions -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>${spring-framework.version}</version>
		</dependency>
		<dependency>
			<groupId>javax.annotation</groupId>
			<artifactId>javax.annotation-api</artifactId>
			<version>1.3.2</version>
		</dependency>
		<!-- Spring jdbc -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jdbc</artifactId>
			<version>${spring-framework.version}</version>
		</dependency>
		<!-- oracle jdbc driver -->
		<dependency>
			<groupId>com.oracle</groupId>
			<artifactId>ojdbc6</artifactId>
			<version>11.1.0.7.0</version>
		</dependency>
		<!-- mybatis -->
		<dependency>
			<groupId>org.mybatis</groupId>
			<artifactId>mybatis</artifactId>
			<version>${mybatis.version}</version>
		</dependency>
		<dependency>
			<groupId>org.mybatis</groupId>
			<artifactId>mybatis-spring</artifactId>
			<version>1.0.2</version>
		</dependency>
		<dependency>
			<groupId>commons-dbcp</groupId>
			<artifactId>commons-dbcp</artifactId>
			<version>1.2.2</version>
		</dependency>
	</dependencies>
</project>

 => 다음 경로에 라이브러리가 사이트에서 받아지고 이후 로컬의 라이브러리를 사용한다.

C:\Users\wonh\.m2\repository\org\springframework\spring-core\5.0.0.RELEASE\

 

③ meta.xml 파일 생성

프로젝트의 [src/main/resource] 오른쪽 클릭 - [New] - [Spring Bean Configuration file] - xml파일명 입력 [next] - [beans],[http://www.springframwork.org/schema/beans/spring-beans.xsd] check - [finish] 

<beans>
	<bean id="mes" class="pack.Message1" />
</beans>

+ Recent posts

1